Taxpayers have made a near-£900m profit on the sale of their shares in Lloyds Banking Group, the lender claimed, as the government offloaded its final stake in the bank and closed a chapter of the 2008 financial crisis.

Almost nine years ago, the government pumped £20.3bn into Lloyds, buying up a stake that was 43% at its peak. The bank said proceeds of the share sales and dividends since then meant taxpayers had received nearly £900m more than the government pumped in.

The bank was born out of the financial crisis, when Lloyds TSB rescued HBOS from the brink of collapse, and has since undergone an overhaul that has led to 57,000 job cuts and a dramatic scaling-back of its lending activities under António Horta-Osório, who joined in 2011.

Lloyds reaches landmark as government sells final shares Read more

Horta-Osório– who has received almost £40m in cash and bonuses during his tenure – said: “Today the government has sold its last shares in Lloyds Banking Group, receiving more money than was originally invested.” The sell-off means a share bonus worth £850,000 – included in that total – will be released next year.

There are a number of ways of calculating the cost of the bailout. Lloyds’ calculations do not include the £3.6bn cost of borrowing funds in the depths of the 2008 crisis, while the Office for Budget Responsibility has used other methodology to show the government will ultimately break even.

The National Audit Office’s most recent assessment of the overall financial sector rescue concludes taxpayers would lose out and have not been “compensated ... for the degree of risk accepted in providing the support”. As well as Lloyds, the NAO’s assessment included the bailout of Royal Bank of Scotland, the nationalisation of Northern Rock and parts of Bradford & Bingley, and emergency funding schemes.

However, Philip Hammond, the chancellor, said taxpayers’ money in Lloyds had been recouped, which he hailed as a “major achievement”.

The government bought the shares during three stages of the financial crisis at an average price of 73.6p a share. The stake’s final sale was confirmed on Wednesday, amid the general election campaigning and after a four-year process.

Previous shares had been sold at prices above 73.6p. But in October, Hammond decided to press on with selling off the government’s remaining 9% stake at a lower price.

Ian Gordon, banks analyst at Investec, pointed out that the shares were trading at 52.5p when Hammond sanctioned the sell-off. “We see the taxpayers’ loss as investors’ gain – the shares have already rallied by 34% in the intervening period. We believe there is further to go,” said Gordon. The shares were trading at 70p on Wednesday.

Speculation is mounting that Horta-Osório will leave now the stake has been sold. He has been linked with roles at rival banks including HSBC, and there have been rumours of a move into the political sphere in his native Portugal. But he has insisted: “The job is not done.”

“Six years ago we inherited a business that was in a very fragile financial condition. Thanks to the hard work of everyone at Lloyds, we’ve turned the group around,” he said.

While the takeover of HBOS is often blamed for the enlarged bank’s problems, Lloyds’ finance director, George Culmer, said the mis-selling of payment protection insurance was also a major issue that required action “right across the bank”.

Finalising the bill for that PPI scandal – which has already topped £17bn – and paying compensation to victims of the HBOS Reading scandal are among the issues facing Lloyds. The bank is also in the throes of taking over credit card firm MBNA which will take its share of the market to 26% and add to its financial dominance: Lloyds has a 25% share of current accounts, 22% of retail deposits and 21% of mortgages.

Despite Hammond’s celebratory remarks, the sell-off has not taken place as envisaged by his predecessor George Osborne who had aimed to hold a discounted share sale to the public – which had to be abandoned when Lloyds shares slumped.

The government still owns more than 70% of RBS and parts of Northern Rock and Bradford & Bingley.