OTTAWA -- The federal Finance Department says the government ran a smaller deficit than it was expecting in the spring budget, ending its 2016-17 fiscal year with a deficit of $17.8 billion.

That compared with a $23-billion deficit that was forecast in the spring budget.

The smaller-than-expected deficit came as revenue was $1.4 billion higher than expected due to higher GST revenue and non-resident income tax.

Program spending was also $3.7 billion lower than forecast due to lower-than expected infrastructure transfer payments; lower-than-expected bad debt expenses; and a downward adjustment to the expenses at the St. Lawrence Seaway Management Corp.

Public debt charges were about $100 million lower than forecast due to lower interest rates.

The deficit for the 2016-17 fiscal year compared with a $1-billion deficit for the 2015-16 fiscal year.

Compared with a year ago, government revenues were down $2.0 billion or 0.7 per cent compared with the previous year due to a drop in personal income tax revenue, employment insurance premium revenue and other revenues, offset in part by an increase in GST revenue.

Program spending rose by $16.2 billion or 6.0 per cent due to increases in major transfers to individuals, major transfers to other levels of government and other transfer payments. Public debt charges were down $1.3 billion or 5.2 per cent due to lower interest rates.

The federal debt was $631.9 billion at March 31, 2017, up from $616.0 billion a year earlier.