A Tanzanian artist has been freed after paying a fine for setting fire to a picture of President Samia Suluhu Hassan in a viral TikTok video.

Shadrack Chaula, 24, was found guilty last week of disseminating offensive information online over the video, which saw him burn the photo and utter words that police said were offensive to the head of state.

The painter was released — having been given a two-year sentence on Thursday — on Monday from a prison in the southwestern city of Mbeya after activists raised the funds for his five million Tanzanian shilling ($1,900) fine.

“Thank you all fellow Tanzanians and the lawyers for standing together to defend me,” Chaula said in a video after his release.

His lawyer Michael Mwangasa confirmed the fine had been paid but said he still planned to appeal the sentence, claiming some legal processes were violated during Chaula’s trial.

Mbeya regional police chief Benjamin Kuzaga said after the arrest of Chaula that his diatribe against Hassan was “very strong” and described the burning of the photo as “humiliation”.

Speaking in Swahili in the video, Chaula called for the government to “hang her to death”, accusing Hassan of killing her predecessor John Magufuli and of “accepting homosexuality in Tanzania”.

Hassan, then deputy president, took office in 2021 after the death of Magafuli and is expected to contest elections due in 2025.

Since taking the helm, Hassan has moved away from Magafuli’s authoritarian policies and embarked on political reforms, including relaxing some restrictions on the media and the opposition.