This article has been updated.

President Trump announced an executive order on Thursday addressing the exemption from legal liability that social media companies such as Twitter and Facebook enjoy for content posted on their sites by users. The order is both premature and misguided.

The role that social media giants play in political and cultural debates has become increasingly contentious. Progressives blame Facebook and others for permitting misleading and false ads and narratives to exist on their sites during the 2016 election. They have pushed those companies to police political speech they deem inappropriate. Conservatives, on the other hand, feel threatened by the major Silicon Valley firms. They know that overwhelmingly most tech executives and employees dislike conservatives’ views on issues such as abortion and transgender rights. They fear their access to the increasingly important means of communication will be censored absent federal intervention, and many support efforts to force the giants to keep their platforms open to all.

Trump’s action was prompted by Twitter’s decision this week to place a fact-check on two of Trump’s tweets that alleged mail-in voting encourages voter fraud, a claim many election analysts say is patently false. The decision to fact-check Trump’s tweets is a de facto editorial comment showing that Twitter disapproved of their content.

Social media companies possess valuable legal immunity by virtue of their purported inability to make such comments. Section 230 of the Communications Decency Act gives Internet companies legal immunity for content others place on their sites because they are not held to have “published” that information themselves. This differs from traditional media and book companies, which can be sued for libel over their content because they exercise judgment and discretion over what is broadcast or printed.

Trump’s order takes clear aim at Section 230 protections. It asks the Federal Communications Commission to draft regulations clarifying when a company forfeits Section 230 protections and asks the Federal Trade Commission to bring lawsuits against companies that engage in political bias in moderating content on their sites. It would also ban federal government advertising on platforms that violate the government’s interpretation of Section 230, denying valuable revenue to the targeted companies.

Trump’s order may not result in anything tangible. The FCC and FTC are independent agencies not under the president’s control. They are not obligated to do what the president asks, and even if they took such action, future commissions could reverse it. The ban on government advertising itself could also be challenged in court as an attempt to limit speech rights by singling out companies that engage in speech disfavored by the president. Courts typically hold such “content-based” restrictions as a First Amendment violation.

The order is also clearly premature. Twitter has banned certain people from its platform, and conservatives allege it has tended to do so much more for people on the right than on the left. But in Trump’s case, the platform permitted the tweet to stand, with the fact-check providing only commentary on its veracity. In a sense, Twitter acted as a heckler to someone making a political speech — something quite different from barring the speech itself.

This does not mean, however, that social media companies should have free rein to censor political speech. The instantaneous power of platforms to transmit ideas to a mass audience at no cost attracts political actors. Political speech is also inherently inflammatory; campaigns always involve exaggerations, questionable allegations or downright lies. Policing that speech would inevitably become a partisan act, transforming those companies into partisan publishers.

Facebook’s Mark Zuckerberg is trying to take the right approach. He has increasingly taken a public role in declaring his and his company’s support for free speech. The company recently announced the creation of an independent oversight board that will hear appeals in cases in which people think Facebook inappropriately removed or censored their material. Its board’s bylaws clearly establish the company’s overriding goal to “protect freedom of expression,” a value at the heart of the First Amendment and Section 230’s protections.

Trump would have been wiser to offer the carrots of applause to good actors such as Zuckerberg rather than wield the sticks of new regulation. But social media executives also need to understand their role. Courts have frequently held that privately held property can be forced to permit free speech when it is the functional equivalent of an old town square. If executives try to keep one side out of the square, they should expect a sheriff to ride into town and put things right.

Watch the latest Opinions video:

Read more: