Turkish Prime Minister Tayyip Erdogan looked a step closer to a presidential bid and to gaining the upper hand in a bitter power struggle, casting strong local election results as a mandate to hunt down enemies within the state “in their lair”.

His AK Party swept the electoral map in Sunday’s polls, retaining control of the two biggest cities Istanbul and Ankara and increasing its share of the national vote as his pugnacious leadership style, beloved by a loyal, conservative voter base, trumped a stream of corruption allegations and security leaks. From a balcony at AKP headquarters at the end of a long and bitter election that became a referendum on his rule, Erdogan told thousands of cheering supporters that his enemies in politics and the state, whom he has labelled “traitors”, “terrorists” and “an alliance of evil”, would pay the price.

“We will enter their lair,” he said, before a huge firework display lit up Ankara’s midnight sky. “They will be brought to account. How can you threaten national security?”

The harsh tone of his balcony address suggested he felt he now had a mandate for strong action against his enemies. “From tomorrow, there may be some who flee.”

The election campaign has been dominated by a power struggle between Erdogan and US-based cleric Fethullah Gulen, whom he accuses of using a network of followers in the police and judiciary to fabricate graft smears in an effort to topple him.

Erdogan, who has long drawn support from the same Muslim professional class that reveres Gulen, has purged thousands of police officers and hundreds of judges and prosecutors since anti-graft raids in December targeted businessmen close to the premier as well as the sons of some government ministers.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.