Turkey's parliament has passed a bill to close down thousands of private schools, many of which are run by an influential Muslim cleric locked in a bitter feud with Prime Minister Recep Tayyip Erdogan.

The move will strike a blow to Mr Erdogan's ally-turned-rival Fethullah Gulen, for whom the schools are a major source of income.

He stands accused of seeking to topple the government with a damaging corruption scandal.

The bill, which was approved late last night, sets 1 September 2015, as the deadline to close down the network of schools.

Mr Erdogan told a boisterous crowd of his party's supporters at an election rally in Turkey's southwest city of Denizli : "Withdraw your kids from their schools," 

He said: "State schools are enough for you."

There are around 4,000 private schools in Turkey, including an unknown number of preparatory schools run by the movement of now US-based Gulen.

Tensions have long simmered between Mr Erdogan and Mr Gulen.

They once worked hand-in-hand as Turkey's conservative pro-business middle class rose at the expense of the military and former secular elite.

But the friction reached breaking point in November when Mr Erdogan's Islamic-rooted government first floated the idea of shutting down the schools.

These are schools which aim to help students prepare for senior school and university.

Mr Erdogan said at the time he wanted to abolish an unfair education system.

He said: "Those who benefit from these courses are the kids of rich families in big cities."

Mr Erdogan hails from humble roots and has tried to cultivate an image as a man of the people during his time in office.

Eyup Kilci, deputy principal of the Gulen-affiliated Guvender school network in Ankara, condemned the new legislation.

He said it gives Turkey the unenviable distinction of being "the only country which bans education activities".

Observers say Gulen's Hizmet (Service) movement risks losing millions of dollars in revenue once its Turkish educational institutions are closed down under the new legislation.

In other attempts to contain the political crisis, Mr Erdogan's government has recently also pushed through legislation tightening state control over the Internet and the judiciary.

It has raised questions at home and abroad about the state of democracy in Turkey.

Mr Gulen has been living in the US since 1999 to escape charges of plotting against the secular state by the then-government, has denied any involvement in the corruption probe.

The Hizmet movement also runs an estimated number of 500 private schools around the world.