U.S. stocks closed sharply higher Wednesday, echoing strong gains in global markets as investor worries eased over Brexit -- Britain’s vote to leave the European Union.

ON WALL STREET. At the close, The Dow Jones industrial average had gained nearly 285 points, about 1.6 percent, to 17,694.7. The Standard & Poor’s 500 index rose 34.7 points, about 1.7 percent, to 2,070.8, and the Nasdaq composite added 87.4 points, about 1.9 percent, to 4,779.3.

The Dow and the S&P 500 index turned slightly positive for the year. Together with a big gain Tuesday, the market is on track to recoup about half of the steep losses it suffered Friday and Monday in the wake of Britain’s vote to leave the European Union.

OIL PRICES. As the markets closed, benchmark U.S. crude was trading up $1.69, to $49.54 a barrel on the New York Mercantile Exchange. In London, Brent crude, used to price international oils, rose $1.62 to $50.20 a barrel.

Energy companies led the rally as the price of crude oil closed higher. Health care, industrials and financials stocks were also among the biggest gainers.

EUROPE STOCKS GAIN. European stock indexes posted gains that eclipsed Wall Street’s for the second day in a row. The British pound edged up against the dollar following its plunge to 31-year lows after the British vote last week.

“The market has moved from a shock,” said analyst Erik Davidson, chief investment officer for Wells Fargo Private Bank. “The worries around Brexit are now moving from short-term worries to long-term worries, and that’s why we’re seeing this dramatic rebound in the market.”

advertisement | advertise on newsday

CONSUMER SPENDING. The Commerce Department said that consumer spending increased 0.4 percent in May on top of a 1.1 percent surge in April. The data underscore that consumer spending, which accounts for about 70 percent of U.S. economic activity, picked up in the spring after getting off to a slow start in 2016.

VIX RECOVERS. In another sign that investors’ worries are easing, the VIX, a gauge of expectation of future U.S. stock volatility, was down 10 percent Wednesday to 16.9. It had hit 25.8 on Friday.

“The VIX is literally where it was two weeks ago,” said Tom Siomades, head of Hartford Funds’ Investment Consulting Group. “[Investors] dumped everything on Friday, and when they came back, they realized things aren’t as bad, and it’s going to take a long time to unwind this thing.”