Angela Quintal, the Africa Program Coordinator for the New York-headquartered media group, and Muthoki Mumo, its sub-Saharan Africa representative, were taken from their hotel in Dar es Salaam to an unknown location by officials late Wednesday.
The women were interrogated by the officials who reportedly said they were from immigration.
"The officials searched the pair's belongings and would not return their passports when asked,” the CPJ said. Quintal is South African and Mumo is Kenyan.
South Africa's Foreign Ministry, confirm that the women were released after officials at South African High Commission intervened.
Quintal and Mumo were reportedly still in Dar es Salaam on Thursday but unreachable on the phone and social media.
Quintal raised the alarm on Facebook on Wednesday night, with a post that read: "SOS we are being taken away for interrogation in Dar. We don't know why. Taken away from Southern Sun Hotel.”
The message and subsequent deactivation of her social media accounts prompted an immediate outcry in South Africa, where she has had a distinguished media career.
African media outcry
The Tanzanian Editor's Forum said it was unclear who had detained Quintal and Mumo or why. TEF Acting Chairman Deodattus Balile told DW their detention came hours after he met with them to discuss the state of media freedom in the country.
"They were asking about the freedom of expression and how it is currently in this country. The main thing they kept asking was about the issue of Azory Gwanda (pictured above), a journalist who has been missing for almost a year now," Balile said.
The CPJ representatives wanted to know why more was not being done to find him, he told DW.
The South African National Editor's Forum (SANEF) said it was deeply disturbed by the incident. "SANEF believes these are very worrying developments. We need to urgently find out the reasons behind this detention,” the forum said.
On the case of a missing reporter
Gwada, an investigative journalist for Mwananchi Communications Limited, was last seen in the company of unknown men who collected him at work. He had been working on reports of the murder of officials from the government and police at the time of his disappearance.
The CPJ confirmed that Quintal and Mumo were in Tanzania on a reporting mission for the organization but gave no details.
In Kenya and South Africa, colleagues of the two journalists criticized the government of Tanzania.
"Bulldozing" the media
"That's Tanzania for you. The regularly murder of albinos, they have a penchant for persecuting gays and now journalists are on their hate list,” one Facebook user stated. "Their president has gone mad,” another FB user wrote.
President John Magufuli of has earned a reputation for "bulldozing” the media since his election in 2015. His government has suspended several newspapers and at least two radio stations that fell foul of it.
Tanzania is ranked 93rd on the 2018 World Press Freedom Index.
Zitto Kabwe, the leader of the opposition Alliance for Change and Transparency told DW he had informed security forces that it was wrong to arrest people who were in the country legally.
"I think the government is just paranoid because even if they were meeting other journalists in the country, it is not illegal."
Sudi Mnette and Asumpta Lattus contributed to this report.