CARACAS - Two British journalists and an Argentine were freed on Friday eight hours after being detained by the Venezuelan military, the national press union (SNTP) said.

Argentine Laura Saravia along with British nationals Barney Green and Dan Rivers were released after being held incommunicado, the SNTP said on Twitter.

They were detained "as they left the country" after having been in "Venezuela for three days reporting on tourism," the union said earlier.

Three people hired as security by the journalists were arrested on Wednesday, it said.

Several foreign journalists have been deported by Venezuelan authorities in recent years for working in the country without the required permits.

Venezuela has attracted a great number of foreign journalists looking to report on its economic and political crises during four years of recession under President Nicolas Maduro.

Citizens face shortages of basic necessities such as food and medicines and failing public services such as water, electricity and transport.

It has resulted in 1.6 million Venezuelans fleeing the country since 2015, according to the United Nations.

Organizations such as SNTP have accused Maduro's government of violating press freedom through the closure of media outlets, censorship and the restriction of paper deliveries, which are monopolized by authorities.

For his part, Maduro has accused international media organizations of being mouthpieces for a United States-backed campaign involving the opposition to overthrow him.