Southeast Asia’s major economies drew more foreign direct investment combined than China for the second straight year in 2014, as growth in their giant neighbor cooled. But by country, inflows into the region were uneven, swayed by political change and the varying costs of doing business.

Overall FDI into Singapore, Indonesia, Malaysia, the Philippines, Thailand and Vietnam rose to a record $128 billion in 2014, estimates show. That surpassed the $119.56 billion that flowed into China.

FDI into the Philippines grew the fastest, at 66 percent, while in Thailand, where the military seized power last year, inflows fell.

FDI into Indonesia, the region’s biggest economy, rose around 10 percent even though it was an election year.

As China’s troubled manufacturing sector loses momentum, Chinese businesses will be venturing abroad to cut operating costs and to search for new markets, economists say.

Manufacturing powerhouses in Southeast Asia should pay heed.

“Rising wages in China are leading low-end manufacturers to look for other low-cost locations for their factories, with countries like Vietnam and the Philippines looking like attractive alternatives,” said Dan Martin of Capital Economics.

“Asean [the Association of Southeast Asian Nations] is also a large market in its own right, and one with good long-term growth prospects. Given the general slowdown in other emerging market regions in recent years, it is starting to stand out.”

The Philippines, the second-fastest-growing major economy in Asia, attracts investors with its strong economic fundamentals. But one concern is the continuity of economic policies following the 2016 general elections.

That means some investment decisions might be postponed. Slumping commodity prices could pinch on FDI inflows into resource-rich Indonesia and, to a lesser extent, Malaysia.

President Joko Widodo is seeking more foreign investment in manufacturing to counter the volatile resources sector. But Indonesia has many improvements to make, particularly in its business infrastructure, to successfully challenge the region’s manufacturing leader, Thailand.