Tanzanian rapper Nay wa Mitego has now been freed from police detention after being arrested over the lyrics of his latest song.
Police earlier said the rapper would be questioned, “for releasing a song with words that malign the government”.
He was reportedly held at a hotel in Morogoro, before being transferred the 190km (120 miles) to the commercial capital Dar es Salaam.
The song emerged last week and has been widely shared on social media.
One line in it asks: “Is there still freedom of expression in the country?” and refers to a “doctor” who can’t tolerate criticism.
Another line in Nay wa Mitego’s song goes: “I see you handed a club to a madman,” which has been interpreted as referring to an official appointed by the president who has been accused of heavy-handed behavior.
Other lines in the song said: “Who are you now? Don’t you want to listen to advice? Don’t you want criticism?”
The information minister, Harrison Mwakyembe, said President John Magufuli “loves” the song.
He also suggested that it be “improved” to take on other issues, such as tax evaders, corrupt business people and drug traffickers.
Nay wa Mitego’s arrest came days after President Magufuli warned media to be careful about exercising freedom.
“Media owners, let me tell you: ‘Be careful. Watch it. If you think you have that kind of freedom – not to that extent,'” Mr Magufuli said.