Government borrowing in the last financial year more than halved from the amount borrowed a year earlier when the UK saw major Covid restrictions.
Borrowing – the difference between spending and tax income – stood at £151.8bn, less than half the £317.6bn borrowed in 2020-21, figures showed.
The government has had to borrow less since pandemic schemes, such as furlough, have come to an end.
It also made more income from taxes which has helped cover the gap.
The Office for National Statistics said the government received much stronger than expected revenues from taxes, with receipts at £619.9bn for the financial year, an increase of £94.3bn.
However, borrowing in March remained well above pre-pandemic levels.
At £18.1bn, the figure was the second-highest amount for the month since records began in 1993, but was £8.8bn less than the amount borrowed in March 2021.
The ONS said the total amount the government borrowed in the last financial year was worth about 6.4% of gross domestic product (GDP).
It was also almost 20% higher than forecast by the Office for Budget Responsibility last month, which said it expected borrowing in 2021-22 to be £127.8bn.
Despite the fall in government borrowing from the previous year, it is still the third-highest level for a financial year since records began in 1947. It also comes as Chancellor Rishi Sunak is under pressure to provide support for households and businesses hit by rising prices.