Official anti-gay prejudice in Tanzania is causing Canadian officials to reassess this country's relationship with one of Canada's biggest aid recipients.

Arrests of gay men in Zanzibar over the weekend, and the launch of "anti-gay patrols" in the former capital Dar es Salaam on Monday, are the latest incidents to alarm Canadian diplomats. They've come up this week at high-level meetings involving not only Canadian and Tanzanian officials but also those of other western donor nations.

Tanzania's homophobic actions are particularly uncomfortable for Canada, which gave Tanzania more than $125 milllion in direct aid last year, making it Canada's sixth-largest aid recipient in the world.

Canada co-chairs the Equal Rights Coalition, a group of 40 nations that Canada helped to create. The coalition promotes LGBT equality around the world and has roundly condemned some of the practices used in Tanzania — particularly the use of forced anal exams to collect "evidence" of homosexual behaviour, which in Tanzania can lead to a life sentence in prison.

'Give me their names'

"Give me their names," Dar es Salaam Regional Commissioner Paul Makonda said in a message to the people of Tanzania's biggest city last week, according to reports by Agence France-Presse. "My ad hoc team will begin to get their hands on them next Monday."

The teams, Makonda said, are composed of police officers, agents of the Tanzania Communications Authority and "media practitioners" who troll through social media accounts in search of homosexual behaviour. They received over 5,000 tips on their first day of operations, he said.

Many gay men in the city are now in hiding, according to local media reports. Others have said they've received extortion demands with threats to denounce them to the vigilante squads.

"These homosexuals boast on social networks," Makonda said, adding their homosexuality "tramples on the moral values of Tanzanians."

As the anti-gay squad prepped for its first patrols in Dar es Salaam, police on the island of Zanzibar arrested ten men.

Seif Magango, Amnesty International's deputy director for East Africa, issued a statement saying the men had been arrested for sitting together in pairs.

"We now fear these men may be subjected to forced anal examination, the government's method of choice for 'proving' same-sex sexual activity among men," he said.

"This must not be allowed to happen. These men must be released immediately."

Canada asks for explanations

As anti-gay harassment has increased since the election of President John Magufuli (nicknamed "The Bulldozer") in 2015, western donors in the country have formed an "LGBT task force" to coordinate their efforts to get the government to change course.

Canada cooperates closely with other countries on the issue, including the U.S., the U.K., the Netherlands and Ireland.

Government officials told CBC News that Canada's new high commissioner to Tanzania, Pamela O'Donnell, raised the matter with President Magufuli when she presented her credentials on Thursday.

But some countries have reacted more strongly than others to the persecution campaign.

Last Saturday, the U.S. warned its citizens in the country to be aware of the threat of arrest and to delete any compromising material on their phones.

On Monday, the European Union went further, withdrawing its ambassador from the country.

Canadian officials have been reluctant to go that far. After meeting with Canadian and other foreign diplomats, Tanzania's ministry of foreign affairs issued a statement distancing itself from Makonda's vigilante squads.

"The Government of the United Republic of Tanzania would like to clarify that, what was said was only personal opinion and not the government's stand," reads the statement. "The United Republic of Tanzania will also continue to respect and uphold all human rights as provided for in the country's constitution."

But the Magufuli government said nothing about stopping the anti-gay crusade proclaimed by Makonda, who is seen as a loyal acolyte of the president. As for Makonda himself, the devout Christian blew off the concerns of donor nations, saying, "I prefer to anger those countries than anger God."

And the national government has itself engaged in persecution campaigns. Last year it threatened to publish the names of gay Tanzanians and ordered the closure of 40 walk-in HIV clinics backed largely by foreign NGOs and governments — because the government accused them of encouraging homosexuality.

"Have you ever come across a gay goat or bird?" Tanzania's Deputy Minister of Health tweeted last year (in Swahili) while defending the arrests of gay men and the closure of HIV clinics.

Canada has devoted much of its AIDS money to maternal health and adolescent girls' health — only to see the Tanzanian government criticize such efforts. President Magufuli has claimed that foreigners are promoting birth control for sinister motives and has urged Tanzanian women to "throw away your contraceptives."

"Those going for family planning are lazy," Magufuli said, saying they could not be bothered to feed more children. Even as experts warn of a looming over-population disaster in the Great Lakes region of Africa, Tanzania's government is encouraging women to have all the children they can.

Rights group warns: Pushing too hard can backfire

"This is a matter of great concern to our government," Adam Austen of Global Affairs Canada told CBC News. "We have raised this issue directly with the government of Tanzania and continue to monitor the situation, working with our like-minded friends and allies. The government of Tanzania has made clear that this is not official policy."

Louis Belanger, a spokesman for International Development Minister Marie-Claude Bibeau, told CBC that the government "take(s) note of the Tanzanian Government's statement stating that the Dar es Salaam Regional Commissioner announcing a campaign against gay acts within Dar es Salaam city was 'only personal opinion and not the government's stand'."

Speaking on background, officials said Canada would wait and see what happens next before deciding its next moves.

Rights groups point out that the Tanzanian government has promised not to target gays in the past, and yet the raids and arrests continue, both in Dar es Salaam and in other parts of the country.

Amnesty International isn't faulting Canada for its cautious approach to the problem, however.

"All too often LGBT rights are seen by some countries as a northern, western creation," said Amnesty's Jacqueline Hansen. "So sometimes, if the push to protect LGBT rights comes from countries like Canada, it can actually have a negative effect."

Hansen said recent outside efforts to help LGBT activists facing pressure in neighbouring Uganda offer a case in point.

"In-country activists told us, 'Please don't take action from the west, this is going to make things worse. We need action from inside sub-Saharan Africa, this is what's going to be helpful to make a difference.'

"We know from previous experience that if foreign aid is cut because of LGBT rights, that can actually fuel backlash against LGBT people in that country. So in this case, we would encourage Canada to leverage other channels, to continue engaging in quiet diplomacy."

Acts of solidarity

Hansen said many activists Amnesty normally would work with in Tanzania have gone into hiding, making it difficult to contact them.

Hansen said that although some African countries are quick to label western pressure for LGBT rights as neo-colonial interference, they are often less willing to examine the origins of the anti-gay codes they are enforcing.

"These are colonial laws still on the books from the British colonial period," she said. "It's ironic. It's frustrating.

"What we're trying to do right now is gently, in a way that won't inflame things, show acts of solidarity online with activists in Tanzania, so they know the world is watching, and they're not alone, and we're here poised to take action in whatever way they deem appropriate."

Canada's new ambassador to Tanzania, Pamela O'Donnell, seems to be doing some of that in her first tweets.