ANTAKYA, Turkey -- Turkey's Parliament approved a law on Thursday that would grant sweeping new powers to the government to censor and monitor the Internet traffic of citizens.

The law, which still requires final approval by the country's president, would permit the government to quickly shutter a website deemed inappropriate, and orders Internet companies to store traffic and other data for two years.

The user data storage provisions of the bill are reminiscent of plans discussed by the Obama administration to require cellular phone companies to store the "metadata" of citizens for a set period of time. That data could later be ordered to be turned over to investigating government agencies, and could be used to track or otherwise monitor phone users. In the U.S., those discussions came in the aftermath of the revelations leaked by National Security Agency whistleblower Edward Snowden.

In Turkey, the new law comes amid a difficult period for the country's prime minister, Recep Tayyip Erdogan, who has faced challenges to his rule from a popular protest movement, as well as a murky powerbroker with ties to the security state.

The government has increasingly responded to attacks on its authority with crackdowns, especially on free speech and the press.

Earlier this week, the U.S.-based democracy organization Freedom House issued a report that strongly condemned Turkey for its harsh new restrictions on the press.

The report, released on Monday, accused the Erdogan government of undertaking a "frantic crackdown" on the media, particularly in the aftermath of a series of dramatic popular protests in Istanbul's Gezi Park.