A Senegalese court has jailed two men for "spreading false news" after they accused Ousmane Sonko, the country's new prime minister, of tolerating homosexuality.
Activist Bah Diakhate and Imam Cheikh Ahmed Tidiane Ndao were jailed for three months and fined 100,000 CFA francs ($165, £130) each.
They had been angered that Mr Sonko had allowed a visiting French politician to express his support for same-sex marriages.
Homosexual acts are banned in the mainly Muslim West African country and are punishable by up to five years in prison.
The political activist and the preacher were arrested two weeks ago after posting a video attacking Mr Sonko for giving a platform to Jean-Luc Mélenchon, a far-left French politician.
Mr Mélenchon gave his opinion about same-sex marriages at a student forum in the capital, Dakar, in mid-May.
His comments reportedly sparked boos from the audience at Cheikh Anta Diop University.
In response Mr Sonko said that Western countries should show restraint on social matters such as LGBTQ rights as it could "lead to anti-Western sentiment".
Senegal would continue to manage issues around homosexuality in accordance with its socio-cultural norms, the prime minister said.
He was quoted as saying that homosexuality was "not accepted, but tolerated" in Senegal.
Mr Sonko, a former firebrand opposition leader, was appointed prime minister in April after his ally Bassirou Diomaye Faye was elected president.
They were freed from prison not long before the vote in an amnesty aimed at calming months of political turmoil after the outgoing president had tried to postpone the election.
The pair campaigned on a promise of radical change - with an Afrocentric and nationalist agenda, promising to reset Senegal’s relationship with France, the country’s former colonial power.