President Donald Trump. Picture: Jonathan Ernst /Reuters/African News Agency (ANA)

US President Donald Trump accused Twitter on Wednesday of censoring him, alleging the social media platform was making it hard for him to get his message out.

"They are trying to rig the election," Trump said in an interview on Fox Business News.

Accusing the tech company of bias toward Democrats and "hatred" of Republicans, he said lawsuits or legislation were needed to check its power.

Twitter and other social media firms have been facing pressure to curb hate speech and extremist propaganda, blocking accounts of many conspiracy theorists. But Trump and his allies contend that the purge has also silenced conservative voices.

Trump has 61 million Twitter followers and has used the platform as a powerful political instrument, but he complained bitterly that his message was being blocked.

"What they did to me on Twitter is incredible," Trump said. "I have millions and millions of followers, but I will tell you they make it very hard for people to join me on Twitter, and they make it very hard for me to get out the message."

The president accused Twitter of being "just terrible what they do" and said he would get fairer treatment if he became a Democrat.

"They don't let you get the word out. I've had so many people come to me, Sir, I can't get you on Twitter," he added.

Asked what should be done about it, Trump responded: "You may need legislation in order to create competition."

AFP