The Turkish President has further tightened government control of the internet as he approved a law that lets the country’s telecoms authority block sites as it deems necessary and forces hosting providers to store users’ browsing history for two years.

Following the steps taken by the country’s Parliament – which passed this same law on Monday – Turkish leader Tayyip Erdogan on Thursday also ratified the law for the sake of “national security”and “public order and the prevention of crimes".

The new law essentially expands the legislation passed in February that allowed the authorities to block access to web pages without a prior court order. Unlike this recently passed law, the previous legislation limited those powers to cases of privacy violations. That move was still protested by an angry public that slammed the government for cracking down on freedom of speech in the country.

This time, Erdogan let the telecoms authority Telecommunication Transmission Directorate (TIB), headed by a former intelligence official, to monitor internet users, block websites and their content without a court order.

The new law stipulates that service providers must either block the website or remove the content within four hours. The head of the directorate will have to seek a legal framework only after shutting down the website.

Moreover, the TİB is obliged to store the browsing history of all web users and the entire web traffic, so that in case of a criminal investigation and a court order, the necessary information could be quickly handed over to relevant bodies.

This means the TIB will be storing online communications – and information on which websites internet users visited – for two years.

“Everyone could be subject to this interception from administrative bodies without a judicial order. Without a law that defines the conditions of storage, the limits of storage and the purpose of storage, it is more than problematic,” a foreign diplomat told the Hürriyet Daily News on Thursday.

Internet freedoms have been a hot topic and a reason for criticism of the Turkish government since February, when the initial law was passed.

The law followed the rise of social networks such as Twitter, Facebook and YouTube, which also led to the release of multiple recordings that sought to prove Erdogan and his ministers were trying to illegally influence political, business, and media affairs.

The TIB then blocked Twitter in Turkey on March 20 for two weeks, following Prime Minister Erdogan’s threat to "root out" the social media network. However, the country’s Supreme Court ruled that the ban violated freedom of expression and individual rights.

YouTube also faced restrictions by the Turkish government on April 9 and was “declared null and void.” The ban was lifted on May 29 when the country's Constitutional Court ruled it was also violating people's rights.