US President Donald Trump has escalated his long-running feud with Twitter and Facebook, signing an executive order which could lead to the social media giants’ legal protections being stripped away.

Trump’s anger against Twitter was reignited earlier this week when the company added a fact-check to his tweets about mail-in ballots, with the president claiming this constituted interference with the upcoming election.

On Thursday, Trump signed an executive order directing government agencies to review the current legal protections given to social media platforms over content posted by their users and urging for these “shields” to be removed for companies found to be “problematic vehicles for government speech due to viewpoint discrimination”.

Trump claimed the order was made to “defend free speech from one of the gravest dangers it has faced in American history”, and that companies found to be engaging in censorship will lose their legal liability shield.

But this would likely lead to social media companies implementing more stringent moderation of content posted on their platforms due to the increased legal risk.

Under the order, agencies such as the Federal Communications Commission and Federal Trade Commission will examine Section 230 of the Communications Decency Act of 1996, which largely makes social media platforms immune from liability of content posted on their platforms, defining them as platforms rather than publishers.

“It is the policy of the United States that the scope of that immunity should be clarified: the immunity should not extend beyond its text and purpose to provide protection for those who purport to provide users a forum for free and open speech, but in reality use their power over a vital means of communication to engage in deceptive or pretextual actions stifling free and open debate by censoring certain viewpoints,” the order said.

“Congress sought to provide protections for online platforms that attempted to protect minors from harmful content and intended to ensure that such providers would not be discouraged from taking down harmful material.”

Trump’s executive order directs this section to be reviewed and to clarify what companies are subject to it.

A working group will also be established to develop draft legislation to crack down on Twitter and Facebook.

The order does not directly lead to any changes or crackdowns against the likes of Twitter or Facebook but could potentially result in legislation or attempts in the future to take away their legal protections.

Under the order, the Department of Justice will review the “viewpoint-based speech restrictions imposed by each online platform and assess whether any online platforms are problematic vehicles for government speech due to viewpoint discrimination, deception to consumers or other bad practices”.

While the order stops short of removing legal protections for these companies, it strongly encourages the agencies to find that they are engaging in censorship, leading to potential changes in the future, lawyer and Hall Estill partner Jon Epstein said.

“The executive order is troubling to those who believe that the section 230 protections are necessary and that the use of the platforms should not be censored based on political viewpoints by government officials,” Epstein said.

“We may have to await further action before the bulk of these issues reach the courts. However, we are on the verge of the battle that the president appears to have sought since his campaign.”

The Twitter fact-check that led to the executive order has been slightly modified, clarifying that it was related to Trump’s false claim that people don’t need to register to get a mail-in ballot.

“There is someone ultimately accountable for our actions as a company, and that’s me,” Twitter found and CEO Jack Dorsey tweeted.

“Please leave our employees out of this. We’ll continue to point out incorrect or disputed information about elections globally. And we will admit to and own any mistakes we make.

“This does not make us an ‘arbiter of truth’.

“Our intention is to connect the dots of conflicting statements and show the information in dispute so people can judge for themselves.

“More transparency from us is critical so folks can clearly see the why behind our actions.”