image copyrightGetty Imagesimage captionMr Trump urged other countries to follow Mr Buhari's move to ban the US-owned social media platforms
Former US president Donald Trump has praised Nigeria's government for banning Twitter after it deleted President Muhammadu Buhari's post for breaching its rules.
"Who are they to dictate good and evil, if they themselves are evil?" Mr Trump said in a statement.
He urged other countries to ban Twitter and Facebook for not allowing "free and open speech".
Mr Trump was banned from both platforms after the US Capitol riot in January.
His posts before and after the raid were alleged to have encouraged violence.
While Twitter made its ban permanent, Facebook announced last week that its suspension, including of the former president's Instagram account, would last at least two years.
- Africa Live: Other stories from the continent
- Can you be arrested for tweeting in Nigeria?
- Uganda social media ban raises questions over regulation in Africa
- Ghana basks in Twitter’s surprise choice as Africa HQ
What did Trump's statement say?
"Congratulations to the country of Nigeria, who just banned Twitter because they banned their president," he said in a statement released on Tuesday.
He suggested that he should have banned Facebook while he was in office, but said the company's boss Mark Zuckerberg "kept calling me and coming to the White House for dinner telling me how great I was".
Mr Trump also backed unnamed rival social media platforms, saying they "will emerge and take hold".
The 45th US president has struggled for attention since his access to Twitter and Facebook was blocked. A website he launched last month to get his word out was closed because of poor traffic.
Why did Nigeria ban Twitter?
The authorities in Nigeria accused the platform of threatening the country's "corporate existence" by allowing "misinformation and fake news to spread."
The ban followed the removal of President Buhari's tweet, which referred to Nigeria's civil war four decades ago, and included a veiled threat towards those backing a secessionist movement in the south-east of the country.
His government said on Saturday the tweet's removal was "disappointing", but was not the only reason for Twitter's "temporary" suspension.
Information Minister Lai Mohammed told the BBC Focus on Africa programme that the platform was being used by Nnamdi Kanu, the leader of separatist group Ipob, to direct attacks against the government in the south-east region.
"This is done consistently and wilfully without consequences," he said.
The professional body of Nigerian mobile phone operators – known as Alton – said its members had been told to block access to Twitter.
The authorities have since said they will prosecute anyone found to have breached the ban, however they have not yet announced any arrests.
A group of human rights organisations says it has filed a case with a West African regional court against the Twitter ban, saying it contravenes the right to the freedom of expression.
It has also been condemned by some Western countries and the body representing Nigeria's lawyers.
Many Nigerians, including prominent politicians, news websites and churches, are continuing to tweet using Virtual Private Networks (VPNs).
Twitter said the ban was "deeply concerning".
Meanwhile, Nigeria's national broadcasting regulator, NBC, announced that it would begin "licensing all internet streaming services and social media operations in Nigeria", a government statement said.