The Online Safety Bill proposes jail terms for content that a five-member commission considers illegal and making social media platforms such as Alphabet's Google (GOOGL.O), opens new tab, Meta's Facebook (META.O), opens new tab and X, formerly known as Twitter, liable for such content on their platforms.
President Ranil Wickremesinghe's government says the bill is aimed at battling cyber crime including child abuse, data theft and online fraud.
"Sri Lanka had 8,000 cyber crimes complaints last year. We all agree that we need laws to address these issues. This is why we are bringing this law," Public Security Minister Tiran Alles said on Tuesday while introducing the bill in the house.
The bill was passed with a majority of 46 votes in the 225-member house, the speaker announced. 108 votes were in favour while 62 members voted against it.