Popular Tanzanian comedian Idris Sultan is being held at a police station in the main city, Dar es Salaam, after sharing photos of a face swap between him and President John Magfuli, his lawyer and family say.
He was summoned to the police station on Wednesday.
A relative told the BBC that he went there on Wednesday evening and has not returned.
His lawyer, Eliya Rioba, told the BBC that he was being held under the Cybercrimes Act, which forbids the impersonation of another person.
The comedian and one-time winner of Big Brother Africa had shared two photos:
Kwa siku moja tukabadilishana kazi ili a-enjoy birthday yake kwa amani 😂🙌🏽 pic.twitter.com/Ch10m4GW7i
— Idris Sultan (@IdrisSultan) October 30, 2019
One showed Mr Magufuli’s head atop Sultan’s likeness, complete with braces, arms folded and sleeves rolled up
The other showed the comedian’s face on Mr Magufuli’s body, suited and posed on a presidential chair with the national seal.
Sultan wrote in Swahili: “We swapped roles for a day so that he could enjoy his birthday in peace.”
President Magufuli celebrated his 60th birthday on Tuesday.
Sultan has more than five million followers across his social media accounts.
Shortly after the posts appeared, an Instagram account thought to belong to Dar es Salaam Regional Commissioner Paul Makonda posted one of the pictures, with a caption telling Sultan to report to any police station in the city for further instructions.
It added that Sultan “doesn’t know the boundaries of his work”.
Rights activists have criticised the law, saying it infringes on freedom of expression.
If convicted, he could face up to seven years in prison.