World oil prices and the US stocks rallied Thursday, joining most global bourses in rallying, as Britain voted in a hard-fought campaign on whether to leave the European Union.
Markets tumbled last week after polls pointed to a win for the "Leave" camp in Thursday's crucial referendum, but they have rallied over the past four days as the pro-EU campaign recovered momentum.
Some analysts warn that a British exit could see the country tumble into recession with global spillover effects.
US benchmark West Texas Intermediate for August delivery advanced 98 cents to $50.11 a barrel on the New York Mercantile Exchange.
In London, Brent North Sea crude for delivery in August, the global benchmark, jumped to $50.91 a barrel, gaining $1.03 from Wednesday's settlement.
"The reason we're up today is because we're less concerned about the Brexit," said Phil Flynn of Price Futures Group. "The reason we sold off yesterday was the concerns about demand in the future with this Brexit uncertainty."
The final results of the Brexit referendum are not expected until about 0800 GMT Friday.
"Despite polls showing a tightly contested result, the markets are firmly convinced that the pro-EU camp will win," Commerzbank analyst Carsten Fritsch said.
The oil market had weakened Wednesday as well due to a smaller-than-expected fall in US crude inventories, adding to concerns about the strength of demand and abundant global supplies.
The Department of Energy said commercial stockpiles last week dropped by 900,000 barrels, far fewer than the 1.5 million barrels forecast by analysts, with supplies remaining at historically high levels.
Adding to the bearish tone was an unexpected rise in gasoline inventories, by 600,000 barrels, as the US summer driving season gets into gear.
The Dow Jones Industrial Average rose 1.3 percent to 18,011.07.
The broad-based S&P 500 gained 1.3 percent at 2,113.32, while the tech-rich Nasdaq Composite Index jumped 1.6 percent to 4,910.04.
Large US banks rose sharply, with Bank of American gaining 3.2 percent, Citigroup 4.2 percent and JPMorgan Chase 2.1 percent.
Petroleum-linked shares also climbed on higher oil prices, with Chevron, Devon Energy and Halliburton all gaining more than two percent.
Chip companies won outsized gains after analysts upgraded Micron Technology, which surged 10.5 percent. Western Digital jumped 5.1 percent and Intel 2.2 percent.
Cloud computing company Twilio nearly doubled on its first day of trade, jumping 91.9 percent after an initial public offering raised $150 million.
Macy's advanced 1.7 percent as it announced that president Jeff Gennette would become chief executive in the first quarter of 2017. CEO Terry Lundgren will shift to executive chairman.
Southwest Airlines fell 1.7 percent after it pushed back the delivery dates of 67 new Boeing planes. Boeing rose 1.4 percent.