BEIJING (AP) — Asian stock markets were mixed Thursday after the U.S. economy contracted and China reported stronger factory activity.

Shanghai and Hong Kong gained, while Tokyo and Seoul declined. Oil prices advanced.

Wall Street’s benchmark S&P 500 index edged down 0.1% on Wednesday after data showed the U.S. economy shrank in the first quarter amid high inflation and weakening consumer confidence.

Investors are uneasy about signs the biggest global economy might be in a recession due to interest rate hikes imposed to cool surging inflation.

“Equities demand could remain muted for at least the next four to six months as interest rate hikes work through the U.S. economy,” said Stephen Innes of SPI Asset Management in a report.

The Shanghai Composite Index rose 1% to 3,394.39 after an official monthly gauge of factory activity rose and new orders improved. The Hang Seng in Hong Kong gained 0.1% to 22,025.14.

The Nikkei 225 in Tokyo fell 0.9% to 26,651.05 after June industrial production slumped 7.2% compared with the previous month. That was the sharpest decline since the start of the coronavirus pandemic in early 2020.

The Kospi in Seoul shed 0.7% to 2,361.93 and Sydney’s S&P-ASX 200 declined 0.8% to 6,644.00.

The S&P 500 slipped to 3,818.83 after official data showed economic activity contracted 1.6% at an annualized rate in the three months ending in March. That was the first contraction since the second quarter of 2020 in the depths of the pandemic.

The U.S. benchmark is down 7.6% for the month and 20% from its Jan. 3 peak.

The Dow Jones Industrial Average rose 0.3% to 31,029.31. The Nasdaq composite slipped less than 0.1% to 11,177.89.

“Not only is recession the base case, but I think it already may have begun,” said Liz Ann Sonders, chief investment strategist at Charles Schwab.

Federal Reserve Chair Jerome Powell, speaking at a European Central Bank meeting in Portugal, said Wednesday there is “no guarantee” inflation can be tamed without hurting the job market.

The global economy has been roiled by anti-virus measures in China that shut down Shanghai and other industrial centers and Russia’s invasion of Ukraine, which pushed up prices of oil, wheat and other commodities.

A monthly purchasing managers’ index released Thursday by the Chinese statistics agency and an industry group rose to 50.2 in June from 49.6 on a 100-point scale on which numbers above 50 indicate activity is increasing. The came after factories, shops and offices in Shanghai and other cities were allowed to reopen.

In energy markets, benchmark U.S. crude gained 35 cents to $110.13 per barrel in electronic trading on the New York Mercantile Exchange. The contract fell $1.98 on Wednesday to $109.78. Brent crude, the price basis for international oil trading, added 50 cents to $112.95 per barrel in London. It shed $1.72 the previous session to $116.26. per barrel.

The dollar rose to 136.62 yen from Wednesday’s 136.54 yen. The euro fell to $1.0442 from $1.0523.