The Hungarian government has passed a set of controversial laws amid scenes of chaos, as opposition MPs sounded sirens, blew whistles and angrily confronted the country’s rightwing prime minister, Viktor Orbán.

One of the new laws raises the amount of overtime employers can demand their employees work and has been labelled a “slave law” by critics. Another establishes new courts to consider government business with a greater role for the justice minister.

Their passing into law provoked a rare show of defiance from the fractured and demoralised opposition, heavily outnumbered in a chamber where Orbán’s Fidesz party commands a two-thirds majority.

Opposition MPs attempted to block the podium while one livestreamed footage as he approached Orbán and shouted questions at him. It is unclear whether the MPs’ actions will lead to a crackdown.

Viktor Orbán in parliament on Wednesday. Photograph: Attila Kisbenedek/AFP/Getty Images

The parliament speaker, László Kövér, said the opposition’s “attempt at obstruction was unprecedented in 28 years of Hungarian democracy”.

Orbán has been accused of a piecemeal takeover of previously independent institutions, as well as extending government control over the majority of Hungarian media outlets.

The judiciary has remained relatively independent but the new legislation will mean the country’s supreme court no longer has the final say in so-called administrative disputes, which cover a wide range of issues including electoral practice and corruption cases.

It puts Orbán on a further collision course with the European parliament, which has already voted to begin disciplinary proceedings against Hungary over rule of law issues.

The government has promised the new courts will be independent of political interference but the justice minister will have a major role in appointing the judges and also oversight of the budget for the courts.

The human rights group the Hungarian Helsinki Committee said the legislation was “a serious threat to the rule of law in Hungary and runs counter to values Hungary signed up to when it joined the European Union”.

The overtime law drew thousands of protesters onto the streets over the weekend, who called for a rise in wages rather than a rise in permitted overtime hours. The government has said it will allow employers to be more flexible. “We have to remove bureaucratic rules so that those who want to work and earn more can do so,” Orbán said in defence of the legislation this week.

Since winning a two-thirds parliamentary majority in April after an election campaign dominated largely by aggressive anti-immigration rhetoric, Orbán has brushed off international criticism and continued to cement his grip on power.

The US ambassador in Budapest, David Cornstein, said when he arrived in summer that the Trump administration wanted new, positive relations with Orbán and would not criticise the government, but asked that Hungary find a way to allow the US-accredited Central European University to stay in Budapest. But Orbán’s government refused to sign an agreement with the university and last week said it would move the bulk of its operations to Vienna from 2019.

Hungary has also irritated EU and Nato allies by giving safe haven to the fugitive former Macedonian prime minister Nikola Gruevski, who was due to start a jail sentence in his home country last month, but instead fled to Budapest with the help of Hungarian diplomats and was swiftly granted asylum.