Turkish Prime Minister Recep Tayyip Erdoğan (United Nations Alliance of Civilizations / Flickr)

The Turkish government this week passed strict new legislation that makes it easier for authorities to shut down websites and access personal data, in what is widely seen as a move to strengthen internet censorship and surveillance at a time of heightened political tensions. The bill was passed late Wednesday by the Turkish Parliament and is expected to be signed into law by President Abdullah Gul.

Supporters of the measure say it will help protect children from "items on the internet that encourage drug addiction, sexual abuse and suicide," and that it was designed to strengthen privacy protection. But opposition leaders and human rights groups have roundly denounced the law, describing it as an attack on free speech. Last month, an estimated 2,000 demonstrators took to the streets of Ankara and Istanbul to protest against the internet bill, prompting riot police to retaliate with rubber bullets, water cannons, and tear gas.

Under the law, Turkey's telecommunications authority will be allowed to unilaterally block websites that are deemed to violate user privacy or contain "insulting" materials. It also requires internet service providers (ISPs) to retain data on its customers' web activities for up two years, and to make that data available to the government upon request. It does not require the government to notify customers when their web data is seized, or obtain a court order before issuing a request.

"Remember that Adolf Hitler used the same methods when he rose to power."

The move comes at a delicate moment for Prime Minister Recep Tayyip Erdoğan whose ruling Justice and Development Party (AKP) is still battling a massive corruption scandal that erupted in December. Opposition groups have accused Erdoğan of growing increasingly authoritarian since coming into office in 2003, pointing to recent media crackdowns and controversial domestic policies. Political tensions exploded in June of last year, when massive anti-Erdoğan protests unfolded across the country. As Wednesday's parliamentary debate proved, relations between the prime minister and opposition parties remain as acrimonious as ever.

"When you came to power you talked of enhancing democracy in Turkey, now you are trying to implement fascism," opposition lawmaker Hasan Oren said of Erdoğan during last night's debate over the internet bill. "Remember that Adolf Hitler used the same methods when he rose to power."

Erdoğan has adopted a hardline stance on both the internet and domestic media during his time in office. Last June, as protests against his administration were just gaining momentum, he described social media as "the worst menace to society," and his government has routinely used filters to block thousands of sites, usually without explanation. According to a 2013 report from the Committee to Protect Journalists (CPJ), Turkey has imprisoned more journalists than any other country over the past two years, surpassing China and Iran.

"any dissenting voice can now be 'lawfully' silenced."

The law passed yesterday builds on a controversial 2007 measure that expanded the state's power to block certain websites. Experts say that the latest legislation was likely motivated by politics, rather than privacy or social concerns, as Erdoğan and his AKP allies look to maintain power amidst a widening graft probe that has already forced several high-ranking officials and cabinet members to resign. Several websites have published recordings of Erdoğan and AKP ministers speaking with businessmen, describing them as proof of the party's corruption, though their authenticity has yet to be verified.

"Internet for the government seems to have become a state security matter rather than a social issue," Buket Bora, research coordinator at the London-based Centre for Turkey Studies and editor of the CEFTUS Insights website, says in an email to The Verge. Bora adds that in light of the new powers that the law grants the federal government, "it could be claimed that any corruption allegations against the government and any dissenting voice can now be 'lawfully' silenced."