Thousands of people protested against Hungary's new media law on Friday, demanding the government withdraw the legislation which has drawn fire from several EU member states.

Hungary, which holds the European Union's rotating presidency, drew sharp criticism from Germany, Britain and France over concerns about restrictions on media freedom. Critics say the legislation is too heavy-handed.

On Thursday, Philip Gordon, U.S. assistant secretary of state for European and Eurasian Affairs, said Hungary should take the international debate about the potential impacts of its media law on the freedom of expression seriously.

Hungary's centre-right Fidesz government has rejected criticism from leading western newspapers and diplomats, saying the law conformed to European norms, but left the door open for potential changes.

The aim of the demonstration is to achieve that the government withdraw the law and create a new one, by involving civil organisations and representatives of the media in the drafting (of the bill) right from the beginning, Robert Folkel, organiser of the protest rally, told Reuters.

About 5,000 people took part in the demonstration in front of the parliament building in Budapest.

The organisers have also launched a movement for press freedom on Facebook. So far, 71,000 people have joined the page.

It's clear that the whole system solely depends on the will of the prime minister, so he can put his hands on anyone's mouth if he feels he's been offended, said Janos Kiss, a pensioner.

Under the law, which took effect on January 1, a new media authority, dominated by appointees of the Fidesz party, will oversee all public news production. It can also levy big fines on private media, which are required to be balanced.

After talks with European Commission President Jose Manuel Barroso last week, Prime Minister Viktor Orban said if EU legal experts found shortcomings in the law, he would be willing to amend it. But Orban has said he was confident the law was not in violation of any EU laws.