* 5-High-ranking military arrests stir fresh Turkey concern.
ISTANBUL, Feb 26 (Reuters) - Two retired generals were charged on Friday over a plot to unseat the government, raising the stakes in a potential stand-off between the ruling party and armed forces that has hit Turkish markets.
The two were the most senior military figures so far to be charged over an alleged 2003 plot. Hours earlier, police had conducted a second wave of military detentions, widening an investigation that has seen more than 30 officers arrested and prompted an emergency summit among Turkey's leaders.
Turkish state-run news agency Anatolian said retired general Cetin Dogan, former head of Turkey's First Army, and lieutenant- general Engin Alan, a former special forces commander, had been formally arrested after appearing at an Istanbul court.
Dogan had occupied a position traditionally seen as a step towards becoming head of the Turkish Armed Forces. Alan led a successful operation to bring captured Kurdish separatist leader Abdullah Ocalan back to Turkey, according to Turkish media.
Turkish markets, weakened by five days of tension since the first wave of detentions on Monday, had begun to recover on Friday on hopes that the likelihood of a confrontation between the government, in power since 2002, and the secularist military was receding with the release of three other retired generals.
However, reports police had detained 17 more serving military officers and one retired officer in an operation stretching across Turkey, sparked renewed selling, and fresh concern over a possible standoff.
"The second wave of arrests will have already raised the tensions," said Istanbul-based analyst Gareth Jenkins, ahead of news of the retired generals' arrest.
Prime Minister Tayyip Erdogan accused the media of fanning alarm among investors, who were unnerved by the detention on Monday of some 50 officers suspected of participating in the alleged plot.
"I am talking to the media bosses," Erdogan told an AK Party function in a televised speech. "No one has the right to turn a country's economy on its head. We won't allow it, because it's clear the state to which the economy has come."
Erdogan's party, which denies accusations it has a secret Islamist agendaa, is banking on an economic recovery after last year's deep recession to win over voters ahead of an election due early next year.
ON EDGE, NOT PANICKY
The military has overthrown four governments in Turkey in the past 50 years and with many of its officers still in detention, and more than 30 charged with crimes, tensions remain high and markets nervous.
Investigations of the three released commanders were also continuing.
Despite Turkey's history of military coups, most people believe the generals would not dare challenge the AK party, which has a huge parliamentary majority, and destroy newfound confidence in democracy.
Turkey is both a NATO member and a candidate to join the European Union, and its Western allies want to see it mature as a democracy.
Analysts fear that politics appear increasingly polarised between the secular, conservative nationalists who represent the old guard and the AK Party, which has won over investors with market-friendly reforms despite its roots in political Islam.
While markets have been edgy, investors haven't hit any panic buttons since trouble first erupted last week between the government and the judiciary, traditionally the other main bastion of secularism.
The Turkish stock index has fallen some seven perent this week, although it managed to close two percent higher on Friday. The lira closed at 1.5485 to the dollar from 1.5520 on Thursday. It has lost just 2.6 percent, though it did strike a nine-month low earlier this week.
The government has threatened constitutional changes to reform the judiciary, raising speculation that Turkey's chief prosecutor could make a renewed attempt to ban the AK Party, having tried and failed two years ago.