* Law approved after heated debate
* Opposition MP hospitalised after brawl
* Opposition says new law is unconstitutional
* Control of judiciary at heart of Erdogan-Gulen feud (Context, quotes)
By Gulsen Solaker and Tulay Karadeniz
ANKARA, Feb 15 (Reuters) - Turkey's parliament approved a law boosting government control over the appointment of judges and prosecutors on Saturday, after a heated debate and a brawl that left one opposition lawmaker hospitalised.
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 (MHP) 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.
Government supporters say the HSYK is dominated by Gulen sympathisers and the bill will strengthen, not weaken, judicial independence. Gulen has denied orchestrating the corruption investigation.
BLOODY NOSE, BROKEN FINGERS
The decision to approve the HSYK law came after a night of fierce debate and a brawl which left one opposition member of parliament with a bloody broken nose requiring hospitalisation and an AKP deputy with broken fingers, local media reported.
The bill had been frozen since early January, when the last debate on it resulted in fist fights in parliament and mass protests outside. Erdogan vowed to push on, denying he was trampling on the constitution as the government faces one of the biggest challenges of his 11-year rule.
Since the graft scandal erupted late last year, the government has reassigned or dismissed thousands of police officers and hundreds of judges and prosecutors in what was widely seen as retaliation and a bid to impede investigations.
Details of the corruption allegations have not been made public, but are believed to relate to construction and real estate deals and Turkey's gold trade with Iran, according to Turkish newspaper reports that cite prosecutors' documents.
The HSYK debate lasted from 1400 (1200 GMT) on Friday and finished at 1000 on Saturday, with 210 members voting in support of the bill and 28 voting against. Many MPs slept through parts of the debate.
CHP had said on Thursday it would appeal the bill in the Constitutional Court if it was approved in parliament.
"If you accept this law, soon you will be repealing the constitution," CHP MP Akif Hamzacebi said during the debate.
"This cover-up of the allegations of corruption and bribery today has dealt a big blow to democracy and freedom."
The Erdogan-Gulen power struggle has highlighted fractures in the religiously conservative support base underpinning Erdogan's decade in power.
The feud has shaken markets, helping drive the lira to new lows, and prompted expressions of alarm from Washington and Brussels about threats to the credibility of the legal system.
(Writing by Dasha Afanasieva; Editing by Tom Heneghan)