Popular Tanzanian comedian Idris Sultan is being held by police after sharing face-swap photos of himself and President John Magufuli, his lawyer says.
His lawyer said he was being held under the controversial Cybercrimes Act, which forbids using a computer system to "impersonate" someone else.
If charged and convicted, he could face up to seven years in prison.
Sultan was called into a police station on Wednesday, according to a relative.
Police and Mr Magufuli's office have yet to comment.
Sultan, the one-time winner of Big Brother Africa, shared two photos on his social media accounts which have more than five million followers.
One of the pictures shows Sultan posing on a presidential chair with the national seal, while the other shows Mr Magufuli's face on the comedian's body.
Kwa siku moja tukabadilishana kazi ili a-enjoy birthday yake kwa amani 😂🙌🏽 pic.twitter.com/Ch10m4GW7i— Idris Sultan (@IdrisSultan) October 30, 2019
The caption was in Swahili, and read: "We swapped roles for a day so that he could enjoy his birthday in peace."
Shortly after the photos were posted, an Instagram comment, thought to be from Paul Makonda, the Regional Commissioner for Dar es Salaam, told Sultan to report to any police station in the city for further instructions, adding that he "doesn't know the boundaries of his work."
A relative told the BBC that Sultan had turned himself in on Wednesday evening, and had not yet returned. Sultan is being held under the 2015 Cybercrimes Act, which forbids using "computer technology" to impersonate someone else, his lawyer Eliya Rioba told the BBC.
If convicted he could face up to seven years in prison, or a fine of up to five million Tanzanian shillings ($2,170; £1,678).
The 2015 Cybercrimes Act has been criticised by human rights activists, who say it infringes on freedom of expression.
'Ruthlessly disembowelling human rights'
Sultan is the second high profile celebrity to run into trouble with the government.
Top African performer Diamond Platnumz was barred from performing in Tanzania last year for "behaving indecently."
Mr Magufuli came to power three years ago. Some of his decisions have been welcomed, such as limiting foreign trips for civil servants, which were seen to many as a waste of taxpayer money.
But other directives aimed at restricting journalists and opposition groups have raised international concerns.
High-profile arrests include Eric Kabendera, a top investigative journalist who is now facing charges of money laundering and tax evasion.
Another journalist, Azory Gwanda, disappeared in 2017 while investigating a series of killings in the coastal district of Kibiti.
There is a "shrinking space for freedom of expression" in Tanzania, according to Human Rights Watch and Amnesty International.
"President Magufuli... must carefully reflect on his government's record of ruthlessly disembowelling the country's human rights framework," said Roland Ebole, a researcher for Amnesty International, earlier this week.
"His government must repeal all oppressive laws being used to clamp down on dissent, and urgently end human rights violations and abuses."