Hong Kong/London/London/New York CNN Business  — 

The Dow and the US stock market staged a rebound Friday, following massive losses in the prior session.

Stocks attempted to recover following the sharpest selloff in three months on Thursday. Though the rally lost some steam in the afternoon – with stocks even briefly turning red – the major indexes ended the day higher.

The Dow (INDU) closed up 477 points, or 1.9%, after having risen more than 800 points in the morning. The S&P 500 (SPX) ended up 1.3%, and the Nasdaq Composite (COMP) finished 1% higher.

Stocks were hammered on Thursday as fears about an increase in coronavirus cases and a somber economic outlook from the US Federal Reserve forced investors to confront risks that had been pushed aside during the huge market rally that has taken place since March.

The three indexes recorded their worst day since March 16 on Thursday. For the Nasdaq, the drastic collapse came after three straight days of all-time closing highs.

But a fear of missing out on cheap stocks pushed the market higher in the first half of Friday.

No major US economic data was released on Friday, but a preliminary reading of consumer sentiment in June showed stronger than expected improvement over the prior month, according to the University of Michigan.

Consumer sentiment fell off a cliff in April, but has clawed back some ground since.

“The turnaround is largely due to renewed gains in employment, with more consumers expecting declines in the jobless rate than at any other time in the long history of the Michigan surveys,” said Richard Curtin, chief economist at the Survey of Consumers.

Global stocks ended lower Friday after fears of a sharp increase in coronavirus cases.

Major indexes in Asia closed with losses. Japan’s Nikkei 225 (N225) ended the day down 0.8% after recovering from a much larger drop in early trading. Hong Kong’s Hang Seng (HSI) declined 0.7%, while China’s Shanghai Composite ended little changed.

European exchanges were higher for most of the session, recovering from Thursday’s declines, but pared their winnings into the close.

The FTSE 100 (UKX) ended little changed, and Germany’s DAX (DAX) closed down 0.6%. France’s CAC 40 (CAC40) finished flat.

Kevin Giddis, chief fixed income strategist at Raymond James, said Thursday’s sell-off was prompted by the realization among many investors that the US economy will take longer to recover from the pandemic than expected.

“The risk markets got a huge boost last week with the reopening of the US economy and a better-than-expected jobs report,” he said. “However, the timing [of the recovery] may not be as optimistic as the markets first thought.”

The US economy added 2.5 million jobs in May, while economists had predicted more job losses. Although that is good news, the gain comes on the heels of 20.7 million jobs vanishing in April.

Jeffrey Halley, senior market analyst for Asia Pacific at Oanda, said that US markets are likely to continue to set the tone for global stocks. “All eyes will be on the US … and whether the correction continues or is forgotten as quickly as it began,” he wrote in a research note. “A sensible case can be constructed for either outcome and a wait and see strategy is the best one.”

Oil markets followed a similar dynamic to stocks, recovering from steep losses in earlier trading before giving up their gains.

US oil settled at $36.26 per barrel, down 0.2%. The global benchmark Brent settled up 0.5% at $38.73 a barrel.

The rout in the oil market was likely a response to fears about the uptick in infections in the world’s largest oil consuming economy, according to Stephen Innes, chief global markets strategist at AxiCorp. Any new shutdowns to contain the virus would slam energy demand again.

— Jazmin Goodwin and Tami Luhby contributed to this report.