The Toronto stock market managed a small advance and the Canadian dollar jumped half a cent against the greenback Friday as oil prices staged a rebound from a recent string of losses.

The S&P/TSX composite index gained 19.36 points to 13,901.77 as the July contract for North American benchmark crude oil rose $1.77 to US$47.98 a barrel.

The more heavily traded August contract was up even more, rising $1.82 to US$48.56 a barrel.

“The price of oil is up, so Toronto is up,” said Norman Levine, managing director of Portfolio Management Corp.

“That’s really what dominates Toronto.”

The metals and mining sector of the TSX was the biggest gainer, rising 1.77%, while energy stocks climbed 1.40%.

The oil sensitive Canadian dollar shot up 0.50 of a U.S. cent to 77.65 cents US.

The weak U.S. dollar is likely responsible for some of the boost in oil prices, said Levine.

“Usually oil and the U.S. dollar tend to work in a reverse relationship — strong dollar, weak oil; weak dollar, strong oil,” he said.

“Most commodities work off the U.S. dollar because they’re all priced in U.S. dollars.”

In the long term, however, Levine predicts that oil will decline.

July natural gas was up four cents at US$2.62 per mmBtu, while July copper was unchanged at US$2.05 a pound and August gold eased $3.60 to US$1,294.80 a troy ounce.

In New York, markets turned lower amid continuing concern over the outcome of the June 23 referendum that could see Britain vote to leave the European Union.

The Dow Jones industrial average was down 57.94 points at 17,675.16, while the broader S&P 500 was off 6.77 points at 2,071.22 and the Nasdaq composite fell 44.58 points to 4,800.34.

“Everybody’s really waiting to see what happens in England next Thursday,” said Levine. “That’s affecting everything in the markets.”

Campaigning became heated this week between supporters and opponents of the so-call Brexit, but was halted after the killing of a British politician who favoured staying in the EU.

Some investors interpreted the assassination as something that could help sway voters to stay in the EU, as stocks in Europe moved higher and British pound advanced against the euro and U.S. dollar.

“That poor woman dying yesterday probably cost the Brexit movement the vote,” said Levine.

In European trading, Germany’s DAX was up 0.85%, while France’s CAC 40 rose 0.98% and Britain’s FTSE 100 added 1.19%

In Asia, Japan’s Nikkei 225 rose 1.07%, while Hong Kong’s Hang Seng added 0.66% and South Korea’s KOSPI composite edged up 0.07%.

With files from The Associated Press