ANKARA - Turkey has started an espionage investigation after a discussion between top officials on potential military action in Syria was leaked on YouTube, heralding a possible government crackdown on its political opponents after elections on Sunday.

The recording of the meeting between Turkey's intelligence chief, foreign minister and deputy head of the military was by far the most serious breach in weeks of highly sensitive leaks, a scandal which Prime Minister Tayyip Erdogan has cast as a plot to sabotage the state and topple him.

Erdogan and his aides have blamed the Hizmet movement of US-based cleric Fethullah Gulen, a former ally whose followers have influence in the police and judiciary, of running a "dirty campaign" of espionage to implicate him in corruption ahead of crucial nationwide municipal elections on Sunday.

"Tomorrow we will teach those liars and slanderers a lesson," Erdogan told a jubilant crowd of supporters in Istanbul's working class Kartal district on Saturday, vowing his ruling AK Party would triumph at the polls.

Gulen has vociferously denied orchestrating the leak scandal, but those close to his network have said they fear a heavy crackdown once the local elections have passed.

Police overnight briefly detained Onder Aytac, a prominent writer and journalist known to be close to the Hizmet movement, on suspicion of having information about the bugging of the foreign ministry meeting, the Hurriyet newspaper said.

Please LIKE our Facebook page - it makes us stronger