ANKARA -- "Turkish democracy" is the winner of the rerun Istanbul mayoral election in which Recep Tayyip Erdogan's ruling party suffered a major defeat, the Turkish president told Nikkei in an exclusive interview Wednesday.

"In Turkey, there is no will above the will of the nation, and no decision above the decision of the nation," Erdogan said.

But the president stressed the continued influence of his Justice and Development Party, or AKP, over the government of Turkey's largest city. "We have an overwhelming majority in the municipal parliament. We won that. AKP leads all the commissions. All of the deputy mayors are from AKP," he said.

"What brought Turkey to this stage of democracy is the AKP government's successful 17 years in power," he said.

Erdogan struck a defiant tone on U.S. threats to impose sanctions if Turkey proceeds with a purchase of Russian S-400 surface-to-air missile systems. Washington has said Ankara will be removed from its F-35 program and forfeit orders for 100 of the cutting-edge fighter jets if the Russian deal is not canceled.

"It is out of the question for us to compromise from this road map," Erdogan said. "We already paid them $1.25 billion for the F-35 project."

"We are not just a market, a buyer, but also a manufacturing partner," he said.

F-35 Bravo Lightning II planes stand ready on the deck of amphibious assault ship USS Wasp in the Atlantic Ocean. Turkey is a customer and a development partner of the plane, President Erdogan said. © Reuters

The Turkish leader said he plans to meet with U.S. President Donald Trump while in Japan for the Group of 20 summit this week and revealed that discussions are underway for Trump to visit Turkey next month. "Mr. Trump knows Turkey's concerns, why we needed this system and how we came to this point very well," he said.

"What I hope is we will get the best results and end this issue," he said.

Yet Erdogan stressed that Ankara is still set to begin receiving S-400 systems next month. Whether Trump will seek to avoid or delay the threatened punitive measures, even in the face of deep-seated anti-Moscow sentiment among U.S. lawmakers, remains to be seen.

Erdogan expressed optimism about the outlook for Turkey's economy, which has experienced two straight quarters of contraction. "We expect a stronger recovery in the second half of the year," he said, citing leading indicators in the second and third quarter that suggest a positive direction.

But economic improvement will require the lira to stabilize after having weakened nearly 10% against the dollar since the start of the year. As the situation stands, Turkey could face a reprise of last year's currency crisis.

Asked about a 2013 agreement between Japan and Turkey to build a nuclear power plant at Sinop on the Black Sea, Erdogan tacitly acknowledged that the project is dead.

The estimate provided by the Japanese side, including Mitsubishi Heavy Industries, "is not compatible with our initial agreement in terms of both cost and project calendar," he said.

Erdogan instead stressed cooperation in other areas, such as "clean coal, renewable energy, R&D work, developing human resources and transportation projects."

Negotiations are underway for an economic partnership agreement between the two countries, which Erdogan said he aims to sign this year. Turkey hopes to boost its agricultural exports, which include hazelnuts and cherries.

Read the full transcript of the interview here.