Turkey's deputy police chief has been sacked, the most senior commander yet targeted in a purge of a force heavily influenced by a cleric Prime Minister Tayyip Erdogan accuses of plotting to seize the levers of state power.

Mr Erdogan's AK Party meanwhile sent plans to parliament to allow the government have more say over the appointment of prosecutors and judges.

Mr Erdogan argues that a judiciary and police in the sway of the Hizmet (Service) movement of cleric Fethullah Gulen contrived a graft investigation now shaking his administration.             

The police website said the deputy head of the national police, Muammer Bucak, and provincial chiefs, among them the commanders in the capital Ankara and the Aegean province of Izmir, were removed from their posts overnight.             

The government has purged hundreds of police since the graft scandal erupted on 17 December with the detention of dozens of people including businessmen close to the government and three cabinet ministers' sons.

Among the dozens questioned, most have been released.

A remaining 24, including two of the ministers' sons, remain in custody, according to local media.

The scandal has shaken investor confidence in Turkey before elections this year and heightened concern about the erosion of judicial independence, something which in the longer term could damage its bid for membership of the European Union.

"We urge Turkey, as a candidate country committed to the political criteria of accession...to take all the necessary measures to ensure that allegations of wrongdoing are addressed without discrimination," a spokesman for the European Commission said when asked in Brussels about the affair.             

Details of the corruption allegations have not been made public, but are believed to relate to construction and real estate projects and Turkey's gold trade with Iran, according to Turkish newspaper reports citing prosecutors' documents.

The affair, exposing a deep rift within the Turkish political establishment, has hit market confidence, driving the lira to new lows.

Ratings agency Fitch warned that "strains on institutional integrity" were among the factors which could weaken Turkey's creditworthiness.

Moody's, which raised Turkey to investment grade last May, said domestic political risk was already factored into its rating, suggesting it plans no imminent change.

Continued uncertainty or even instability could present hazards for the region, where Turkey has extended its role under Mr Erdogan.

Turkey borders Iraq, Iran and Syria and hosts hundreds of thousands of Syrian refugees.

Mr Erdogan has cast the graft investigation, which poses arguably the biggest challenge of his 11-year rule, as an attempted "judicial coup" backed by foreign forces.

His allies argue the accusations have been fabricated.

Mr Gulen, who lives in the United States, denies involvement in launching the corruption investigation.

The scandal comes three months before local elections that will constitute a test of Mr Erdogan's long-standing popularity.

The ruling party bill on the judiciary, published on parliament's website, proposes changes to the structure of the High Council of Judges and Prosecutors (HSYK), the body responsible for appointments in the judiciary, which Mr Erdogan has criticised since the corruption scandal erupted last month.

It allows the undersecretary of the justice minister to be elected as chairman of the HSYK board, a move which would give the government a tighter grip over the choice of judges.             

Mr Erdogan and Hizmet, which exercises influence through a network of contacts built on sponsorship of schools and other social and media organisations, accuse each other of manipulating police and judiciary and threatening stability.

Mustafa Sentop, a deputy chairman of the AKP, said the bill was meant to stop a "parallel structure" - a term Mr Erdogan's supporters use to refer to Hizmet - from wielding influence.     

"We aim to ensure the independency and neutrality of the judiciary and to prevent a parallel structure, groups within theHSYK, from achieving political goals through the judiciary," he said.

"This is not an attempt to intervene against an independent judiciary," he said.

But the row is damaging faith in Turkey's institutions.             

"All this will act as a drag on investment, growth and development, while weighing against the EU accession drive," said Timothy Ash, head of emerging markets at Standard Bank.

"This has been a gift to Turkey's opponents and critics in Europe."