Sri Lanka's lawmakers passed a bill to regulate online content on Wednesday, the speaker of the parliament announced, a law which opposition politicians and activists say will muzzle free speech.

The Online Safety Bill proposes jail terms for posting content that a five-member commission considers illegal and makes social media platforms such as Google, Facebook and X liable for messages on their platforms.

(Reporting by Uditha Jayasinghe; Writing by Sudipto Ganguly; editing by Andrew Heavens)