HANOI, May 17 (Reuters) - Foreign investors have reduced by nearly $2 billion their securities holdings in Vietnam's main stock market since early 2023 despite the bourse's positive performance, with the largest outflows recorded during weeks of political upheaval, data show.

The Communist-ruled country has been in the grip of unprecedented political turbulence over the last two years, with thousands of officials and business executives prosecuted under a sweeping anti-corruption campaign, which led also to the resignation of two state presidents and the chairman of the parliament.

The infighting has significantly slowed the administration, delayed approvals of projects and kept idle billions of dollars in public and foreign funds, causing jitters among foreign investors who are also worried about the impact of the deadlock on power supplies.

Nowhere is foreigners' unease clearer than in the Ho Chi Minh stock market, the country's largest trading venue.

In spite of the $200-billion market's 22% rise since the start of 2023, foreign investors cut their exposure to the bourse, selling stocks, funds and bonds worth about $2 billion in the same period, stock market data show.

Half of that outflow has taken place this year, with sales exceeding buys in 17 of the 20 weeks so far, closely coinciding with bad political news, the data show.

Overseas investors offloaded a net 4.7 trillion dong ($184.7 million) worth of stocks in the week starting March 25, the worst week so far this year. That was shortly after Vietnam's president, Vo Van Thuong resigned, on March 20 as the party accused him of unspecified wrongdoing.

The week of Thuong's resignation was the second-worst, with total net-selling at 3.18 trillion dong. The third-worst was last week, with outflows worth 3.14 trillion dong, the first full working week after the resignation of Vietnam's parliament chair, Vuong Dinh Hue, on April 26.

"The political shake-up doesn't seem to bother ... local investors at the moment, but I feel that it has an impact on foreign investors," said Petri Deryng of Pyn Elite Fund, a Finnish equity fund active in Vietnam.

The drop in foreign holdings is also linked to high U.S. rates, which make U.S. investments more attractive and put pressure on the Vietnamese currency, said Mirae Asset Securities and SSI Securities Corporation, two of the country's largest brokers.

Despite the turmoil, pledges for foreign direct investment, mostly in industrial operations, have remained high this year, largely led by Chinese companies, government data show.

However, manufacturing investments usually are decided months or years in advance, a Vietnam-based foreign consultant said, noting the impact of recent developments may be seen only in the long term.

(Reporting by Francesco Guarascio @fraguarascio and Phuong Nguyen; additional reporting by Khanh Vu; Editing by Gerry Doyle)