The U.S. Justice Department on Wednesday outlined a broad overhaul of legal protections for online platforms such as Alphabet Inc.’s Google and Facebook Inc. if they deliberately promote illegal speech on their websites.

The proposals, which could upend the companies’ business models, would also have the effect of limiting their discretion over removing political posts and take away liability protection for encrypted platforms such as Facebook’s WhatsApp.

The recommendations for legislation follow a feud between President Donald Trump and Twitter Inc., which last month slapped fact checks on some of his tweets.