Tanzanian police have warned against the use of social media to spread misinformation following a widely shared video of an alleged military officer criticizing the government, three weeks ahead of general elections.

Identifying himself as Capt Tesha from the air force, he accuses the government of corruption, rights violations, and political interference in the military.

The military did not respond to BBC inquiries about his identity, and the BBC has not been able to verify whether he is a serving officer.

The purported officer urges military chief Jacob Mkunda to take action to ensure the country is united and uphold citizen's rights.

He also encourages Tanzanians to push for their rights and hold demonstrations, stating the security forces support them. We cannot let the nation be lost in the hands of some few people. I also advise my chief of defense to take action against what is happening in the country, he says.

This incident emerges as Tanzania prepares for general elections amid a tense atmosphere. In a response to the viral video, the military warned against attempts to engage it in politics. Military spokesman Col Bernard Masala Mlunga stated that such information is often propagated by individuals claiming military affiliation or are former members dismissed for misconduct or political activism.

The TPDF (Tanzania People's Defence Force) maintains it will adhere to its constitutional duties with integrity and professionalism.

Recently, police declared that sharing of criminal and inflammatory information is misusing social media and warned that offenders would face justice.

Tanzanian opposition activists have been re-sharing the viral video, perceiving it as a sign of military solidarity. With President Samia Suluhu Hassan aiming to secure her presidency under the ruling Chama Cha Mapinduzi (CCM), the political landscape becomes increasingly charged, especially with the main opposition party, Chadema, being banned from the polls and its leader facing treason charges perceived as politically motivated to silence dissent.

As October 29 approaches, concerns mount regarding the electoral process's fairness, amidst tightening government control over media, public gatherings, and opposition activities.