(Adds quote, stocks, background)
By Ezgi Erkoyun
ISTANBUL, June 24 (Reuters) - The Turkish lira, bonds and shares gained on Monday after the opposition dealt a stinging blow to President Tayyip Erdogan by winning control of Istanbul in a re-run mayoral election on Sunday.
Turkish assets have lost value since March amid uncertainty over how the vote might affect Erdogan's economic policies and concern over strained relations between Ankara and Washington related to Turkey's purchase of Russian S-400 defence systems.
One banker said the outcome had removed a source of political uncertainty and markets were hoping the government would now shift its attention to the economic reforms that Turkey needs.
"This optimism could be limited or temporary as the S-400 issue and possible sanctions by the United States are still the most important risk element," said the banker, who requested anonymity.
Economic data on Monday also provided some encouragement. A manufacturing confidence index rose to 102.5 points in June. The capacity utilisation rate rose to 77.1%.
The lira gained to 5.72 overnight after the election outcome emerged, rallying from a close of 5.8140 on Friday. The currency stood at 5.7270 at 0743 GMT.
Ekrem Imamoglu of the Republican People's Party (CHP) secured 54.21% of votes, according to the head of the High Election Board - a bigger margin than his narrow win three months ago.
Michael Every, a senior strategist at Rabobank, said the key question is whether the government focuses on economic reform or tries to keep Imamoglu from using his mayorship to build enough momentum to challenge Erdogan in the 2023 parliamentary and presidential elections.
POSSIBLE SANCTIONS Ankara and Washington have sparred publicly for months over the S-400 missile systems, expected to be delivered to Turkey as early as next month. Washington has said that would trigger U.S. sanctions under CATSAA, a law calling for sanctions against countries procuring military equipment from Russia.
Erdogan and President Donald Trump are set to meet at a G20 summit in the Japanese city of Osaka on June 29-30, in part to discuss the S-400s and the threat of U.S. sanctions. Investors have held out hope the leaders can find a solution.
"We have a low conviction that bold reforms will be implemented after Treasury and Finance Minister Albayrak did not provide concrete details of his economic programme in April. The S-400 and F-35 issues are even more pressing," Every said.
Turkey's main BIST 100 index rose some 2% at morning trade and the banking index was up more than 3%, after election results. The two-year benchmark bond yield fell to 18.65% from 19.92% on Friday.
Turkey's dollar bonds also gained, with longer-dated bonds rising more than 1 cent to hit multi-month highs, according to Tradeweb data. (Reporting by Behiye Selin Taner; additional reporting by Karin Strohecker in London; writing by Ezgi Erkoyun; editing by Daren Butler, Larry King)