Tanzanian authorities have restricted access to social media platform X after several government accounts, including the national police force's official account, were hacked and used to spread misinformation.

The cyberattack, which occurred on Tuesday, saw hackers post sexually explicit content and falsely claim that President Samia Suluhu Hassan had died. The Tanzanian Police Force has denied this information and launched an investigation to identify those responsible for the breach.

Internet observatory NetBlocks confirmed that X had become "unreachable on major internet providers" across Tanzania following the incident. By Wednesday, users in Dar es Salaam reported continued inability to access the platform, though some in other regions of the country maintained limited access.

Information Minister Jerry Silaa addressed the situation in parliament, confirming the cyberattack and assuring lawmakers that the compromised government accounts had been secured. Government spokesperson Gerson Msigwa issued a stern warning to the perpetrators, stating that swift action was being taken against those responsible.

The timing of the X platform restriction coincides with heightened political tensions in Tanzania. The government recently deported several prominent Kenyan figures, including former Justice Minister Martha Karua, who had traveled to Tanzania to attend a court hearing for opposition leader Tundu Lissu, who is currently facing treason charges.

President Hassan responded to the deportation incident on Monday, stating that she would not allow foreign activists to interfere in Tanzania's internal affairs or cause unrest in the country.

This incident marks another chapter in the complex relationship between African governments and social media platforms, particularly X (formerly Twitter), which has faced restrictions in several countries across the continent in recent years.