The Turkish parliament has passed a contested bill tightening government control over the judiciary, after violent scuffles broke out in the assembly. 

Fighting erupted between ruling party and opposition politicians as the bill was debated overnight, with at least one deputy seen with a bloodied nose.

Parliament resumed debate of the bill yesterday despite an uproar from opposition parties and the international community when it was initially tabled last month.

Turkey's government is grappling with a high-level corruption scandal that has involved top allies of Prime Minister Recep Tayyip Erdogan since it erupted on 17 December.

The scandal involving allegations of bribery for construction projects, as well as illegal trade with sanction-hit Iran, marks the biggest challenge yet to Mr Erdogan's 11-year rule ahead of March local elections. 

The Turkish leader said the investigation has been instigated by political rivals, including powerful exiled cleric Fethullah Gulen.

He has retaliated by sacking thousands of police and prosecutors running the investigation. 

The judicial legislation is seen as Mr Erdogan's latest attempt to reassert control. 

It includes clauses that would give the justice minister the right to investigate members of the top judicial body Supreme Board of Judges and Prosecutors, and the right to dictate the topics discussed during the board's meetings.

The law now awaits the signature of President Abdullah Gul to come into force.