Turkish legislators from Prime Minister Recep Tayyip Erdogan's ruling party and the main opposition Republican People's Party brawl during a tense all-night debate over a controversial law. AP Photo

Turkey's parliament approved a law boosting government control over the appointment of judges and prosecutors Saturday, after a heated debate and a brawl that left one opposition lawmaker hospitalized.

Dozens of MPs broke into fights during the tense 20-hour debate and insults flew across party lines. When an opposition deputy called Prime Minister Tayyip Erdogan a dictator, deputies from the leader's party shouted back, “Are you drunk?”

The battle for control of the Higher Council of Judges and Prosecutors (HSYK), which appoints senior members of the judiciary, lies at the heart of a feud between Erdogan and influential U.S.-based cleric Fethullah Gulen.

Gulen, whose followers say they number in the millions, is believed to have built up influence in the police and judiciary over decades and leads a powerful worldwide Islamic movement from a forested compound in the United States.

Erdogan, head of the ruling AK Party, blames him for unleashing a corruption investigation he sees as an attempted "judicial coup" designed to undermine him in the run-up to local and presidential elections this year.

Opposition parties said the HSYK bill aimed to stifle a graft investigation launched on Dec. 17 in which dozens of prominent business people, the sons of three cabinet ministers and state officials were questioned.

"The government is in a great hurry, this shows how deep the corruption and bribe allegations are," Oktay Vural, MP for the Nationalist Movement Party, said.

"They are trying to pass a law which will increase the grip of the execution on judges and prosecutors in such a hurry and with unlawful means," he added.

But government supporters say the HSYK is dominated by Gulen sympathizers and the bill will strengthen, not weaken, judicial independence. Gulen has denied orchestrating the corruption investigation.