* AKP candidate wishes CHP opponent 'all the luck'
* Opposition CHP earned narrow win over ruling AKP in March
* Results were annulled, raising concerns over autocracy
* Results could loosen Erdogan's iron grip on power (Adds comments from leading candidate, context)
ISTANBUL, June 23 (Reuters) - Turkey's main opposition headed for a decisive victory on Sunday in Istanbul's re-run election, dealing one of the biggest blows to President Tayyip Erdogan during his 16 years in power and promising a "new beginning" in the country's largest city.
Ekrem Imamoglu, mayoral candidate of the secularist Republican People's Party (CHP), was leading with 54% of votes versus 45% for Erdogan's AK Party (AKP) candidate, with more than 99% of ballots opened, Turkish broadcasters said.
"Today, 16 million Istanbul residents have renewed our faith in democracy and refreshed our trust in justice," Imamoglu told supporters.
His AKP opponent, former prime minister Binali Yildirim, congratulated him and wished him "all the luck" in serving Istanbul, Turkey's commercial hub. Erdogan also tweeted his congratulations to the CHP candidate.
Imamoglu had won the original mayoral election on March 31 by a narrow margin that prompted the Islamist-rooted AKP to demand a re-run, citing what it said were voting irregularities.
The High Election Board's decision to grant that request drew sharp criticism from Turkey's Western allies and from Erdogan's opponents at home, stirring concerns about the rule of law and raising the stakes in a re-run that many Turks saw as a test of their country's democracy.
Broadcasters put the CHP's lead on Sunday at about 700,000 votes, eclipsing the roughly 13,000-vote margin in March.
The election board said it would announce the election results as soon as possible.
JUSTICE AND LOVE
Imamoglu, a former businessman and district mayor who waged an inclusive campaign and avoided criticising Erdogan, said he was ready to work with the AKP to tackle Istanbul's problems, including its transport gridlock and the needs of its Syrian refugees.
"In this new page in Istanbul, there will from now on be justice, equality, love, tolerance; while misspending (of public funds), pomp, arrogance and the alienation of the other will end," he said.
The handover of power in the mayor's office could shed further light on what Imamoglu said was the misspending of billions of lira at the Istanbul municipality, which has a budget of around $4 billion.
Erdogan himself served as Istanbul's mayor in the 1990s before he embarked on a national political career, dominating Turkish politics first as prime minister, then as president. He presided over years of strong economic growth but critics say he has become increasingly authoritarian and intolerant of dissent.
If confirmed, this second defeat in Istanbul would be a major embarrassment for the president and could also weaken what until recently seemed to be his iron grip on power. He had campaigned hard in Istanbul and had targeted Imamoglu directly with accusations of lying and cheating.
Analysts say the loss could set off a cabinet reshuffle in Ankara and adjustments to foreign policy. It could even trigger a national election earlier than 2023 as scheduled, though the leader of the AKP's nationalist ally played down that prospect.
"Turkey should now return to its real agenda, the election process should close," MHP party leader Devlet Bahceli said. "In this context, talking of an early election would be among the worst things that can be done to our country."
Turkey's economy is now in recession and the United States, its NATO ally, has threatened sanctions if Erdogan goes ahead with plans to install Russian missile defences.
The uncertainty over the fate of Istanbul and potential delays in broader economic reforms have kept financial markets on edge. Turkey's lira currency tumbled after the decision to annul the March vote and is down nearly 10% this year in part on election jitters. (Additional reporting by Humeyra Pamuk, Daren Butler, Ece Toksabay, Eylul Aytan and Tuvan Gumrukcu; Writing by Jonathan Spicer; Editing by Gareth Jones)