Quebec said on Thursday its budget surplus for the year ended March 31 totalled $4.5 billion, almost double its target, as it spent less and took in more taxes than it had forecast.

S&P Global last week raised Quebec's rating to AA-minus from A-plus, citing “strong budget surpluses and declining debt burden.” That put Quebec's S&P rating above Ontario's, which is Canada's most populous province, for the first time since 2006.

Quebec Finance Minister Carlos Leitao in March had forecast a surplus of $2.3 billion, saying that all but $250 million would go to Quebec’s Generations Fund that was created to offset the province’s gross debt of $206 billion.

Quebec had a net budget surplus of $2.5 billion after making that payment to the Generations Fund.

The yield on Quebec's 10-year bond was trading at half a basis point below Ontario's 10-year bond on Thursday, indicating that Quebec pays less to borrow.

The surplus will be held in a reserve to be used in case of exceptional circumstances, an official in the finance minister's office told Reuters.