There’s a shift underway in Asia that’s reverberating through global financial markets.

Japan’s stock market, overlooked by investors for decades, is making a furious comeback. The benchmark Nikkei 225 index is edging closer to the record it set on Dec. 29, 1989, which effectively marked the peak of Japan’s economic ascendancy before a collapse that led to decades of low growth.

China, long an impossible-to-ignore market, has been spiraling downward. Stocks in China recently touched lows not seen since a rout in 2015, and Hong Kong’s Hang Seng Index was the worst-performing major market in the world last year. Stocks stemmed their slide only when Beijing recently signaled its intention to intervene but remain far below previous highs.

This year was set to be a tumultuous one for global markets, with unpredictable swings as economic fortunes diverge and voters in more than 50 countries go to the polls. But there’s one unforeseen reversal already underway: a change in perception among investors about China and Japan.

Seizing on this shift, Japan’s prime minister, Fumio Kishida, addressed more than 3,000 global financiers gathered in Hong Kong this week for a conference sponsored by Goldman Sachs. It was the first time a Japanese prime minister had given a keynote address at the event.

“Now Japan has a golden opportunity to completely overcome low economic growth and a deflationary environment that have persisted for a quarter of a century,” Mr. Kishida said in a video recording. His government, he said, would “demonstrate to all of you Japan’s transition to a new economic stage by mobilizing all the policy tools.”

It’s the kind of message that Japan has been honing for a decade, and now investors want to hear more of it. Foreign investors pumped $2.6 billion into the Japanese stock market last week, adding to $6.5 billion the week before, according to data from Japan Exchange Group. That is a stark shift from the roughly $3.6 billion that was yanked out in December.