Canada’s main stock index rose sharply Thursday, boosted by a strengthening energy sector after a 24-nation alliance led by OPEC member Saudi Arabia and Russia agreed to prolong crude output cuts.

The Toronto Stock Exchange’s S&P/TSX composite index advanced 99.76 points to 16,067.48, with oil and gas company stocks up more than 2%.

The Organization of the Petroleum Exporting Countries cartel and a group of allied oil-producing nations agreed Thursday at a meeting in Vienna to extend crude output cuts until the end of next year, continuing a policy that led to a significant rise in the price of oil over the past year.

The announcement saw oil prices, which have been falling all week, recover from an early afternoon slide, with the January crude contract finishing the day up US10¢ at US$57.40 per barrel.

“Today you’ve got the energy stocks up, even though the price of oil is flat,” said Norman Levine, managing director of Portfolio Management Corp. in Toronto.

“The price of oil has already gone up quite a bit. Unless there was something out there that they weren’t expecting from this meeting, I wouldn’t have thought it was going anywhere on the upside.”

On the corporate front, two of Canada’s big banks reported earnings on Thursday.

Shares of Canadian Imperial Bank of Commerce (CIBC) rose $3.34, or 2.91%, to $118.14 after the country’s fifth-largest lender reported strong domestic earnings and better-than-expected performance in the U.S. after acquiring Chicago-based PrivateBancorp Inc. CIBC earned a fourth-quarter profit of $1.16 billion, up from $931 million during the same time in 2016.

Meanwhile, Toronto-Dominion Bank was down $1.81, or 2.41%, to $73.24 after Canada’s biggest lender by assets reported it earned $2.71 billion in its fourth quarter, up from $2.30 billion a year ago, boosted by its Canadian and U.S. retail banking business.

Read: CIBC’s Q4 earnings beat expectations; TD’s results fall short

South of the border, U.S stocks powered to new highs on Wall Street, giving the Dow Jones industrials their biggest gain since March and putting them past 24,000 points for the first time.

Other market indicators also reached milestones on Thursday as the Standard & Poor’s 500 index, which is widely followed by professional investors, had its biggest monthly gain since February.

The Dow Jones industrial average surged 331.67 points to 24,272.35 and the S&P 500 index added 21.51 points to 2,647.58. The Nasdaq composite index was up 49.58 points to 6,873.97.

Technology stocks were responsible for much of the gain on Wall Street, following a sharp pullback the day before. Investors also welcomed signs that the odds were improving for the Republican-led effort to forge a sweeping tax overhaul bill.

In currency markets, the Canadian dollar was trading at an average price of US77.59¢, down 0.21 of a U.S. cent.

Levine said energy prices are weighing on the loonie as well as uncertainty in Ottawa over the credibility of Finance Minister Bill Morneau, who has been at the centre of an ethics controversy for weeks over his personal finances and conflict-of-interest allegations over proposed pension reforms.

“That could have some weight on the Canadian dollar if he had to resign,” said Levine. “That has to be weighing on investors.”

Conservative Leader Andrew Scheer said on Thursday it’s time for Morneau to step down amid new revelations his father sold off about $1.5 million shares in their family-built company right before the minister made a major 2015 tax-change announcement.

Elsewhere in commodities, the January natural gas contract was down US15¢ to US$3.03 per mmBTU, the February gold contract fell US$9.50 to US$1,276.70 an ounce and the March copper contract gave back about a penny at US$3.06 a pound.

With files from The Associated Press