DAR ES SALAAM (Reuters) - Tanzania released two staff members of the New York-based Committee to Protect Journalists (CPJ) on Thursday, a day after they were detained and their passports seized, the South African Foreign Ministry said.

FILE PHOTO: Tanzanian President John Magufuli leaves after inspecting a guard of honour during an official visit to Kenya, October 31, 2016. REUTERS/Thomas Mukoya/File Photo

Tanzanian Immigration Department spokesman Ali Mtanda said Angela Quintal and Muthoki Mumo were arrested for violating the terms of their visas by holding meetings with local journalists. “They were supposed to get a separate permit for that,” he said.

CPJ accused the authorities of sending a false tweet from Quintal’s personal account saying that they had been released, and making several attempts to access her email account.

“It is now abundantly clear to anyone who followed the latest developments that Tanzanian journalists work in a climate of fear of intimidation,” said Joel Simon, CPJ’s executive director.

Quintal and Mumo had safely left the country after their detention, the group said.

President John Magufuli’s government has been criticized by opposition politicians and international rights groups for what they say is growing authoritarianism and intolerance of dissent. The government rejects the criticism.

Quintal, a South African citizen, and Mumo, a Kenyan, were detained in their Dar es Salaam hotel room by immigration officers and taken to an unknown location in the country’s commercial capital, according to the CPJ.

The two were freed on Thursday into the hands of South Africa’s diplomatic mission, South Africa’s foreign ministry said in a statement.

Mtanda said Quintal and Mumo were free to stay on in Tanzania as long as they heeded the terms of their 90-day visa.

Quintal works as the CPJ’s Africa program coordinator while Mumo is the group’s sub-Saharan Africa representative.

The European Union said this week it would review its relations with Tanzania after an official in Dar es Salaam threatened to launch a crackdown on homosexuals.