Igor Russak/SOPA Images/LightRocket via Getty Images

Thousands of Russians on Sunday protested the country's tightening grip on its internet.

The main rally took place on Moscow's Prospekt Sakharova street, where people chanted slogans demanding freedom online, according to Reuters.

Last month, Russian politicians supported legislation that could see Russia disconnect from the worldwide internet to test its cyberdefenses -- a notion critics compared to an "online iron curtain."

Officially sanctioned protests took place in Moscow, the southern city of Voronezh and Khabarovsk in the east, while a few people protested in St. Petersburg without authorization, Reuters noted.

Activists said that more than 15,000 people gathered in Moscow, double the estimate by police, and that several protesters were arrested, the BBC reported.

The legislation, known as the Digital Economy National Program, will be up for a second vote this month, after which it'll go to the upper house of the parliament and ultimately to President Vladimir Putin for signing.

Roskomnadzor, Russia's state communication agency, didn't immediately respond to a request for comment.

Last year, Russia's ban on messaging app Telegram sparked similar protests. Authorities said terrorists used the encrypted app to plan a deadly 2017 attack.