Kirklees coffers were boosted by £18.79m from financially-troubled retailer Tesco.

The deal was struck between the store and council after Tesco bought itself out of a deal to buy council land and build a new store in Huddersfield.

Kirklees and Tesco agreed a legally-binding deal in 2010 where the retailer would buy council land off Huddersfield’s ring road, on the site of the existing Huddersfield Sports Centre, to build a new store.

But they axed the plan in January this year and entered into talks to get out of the deal.

A line in the council’s unaudited Statement of Accounts, which has just been published, reveals: “Other Operating Expenditure contains a gross receipt of £18.8 million from an Exit Agreement which arose from a contracted land sale not taking place.”

Tesco also bought up non council-owned land for the proposed development which it has also transferred to the council.

It’s not yet known if the £18.8m is just the original deal plus the extra cash that Tesco pledged to get out of its legal responsibilities or if it includes this land and the value of the council-owned land.

A Kirklees Council spokesman has confirmed that all of the money will be used to part-fund the new Huddersfield Leisure Centre, said to cost £36m.

The centre opened two months ago and attracted 75,000 visitors in the first month.

Cabinet members will receive a report on the exit agreement tomorrow - Tuesday, however the figure does not feature in the public agenda.

The agenda says: “The council, Tesco and the other group companies completed the Exit Agreement on 18 May 2015. As a result, the council owns the entire development site between Southgate, Leeds Road and Old Leeds Road, which extends to approximately 2.744 hectares (6.785 acres).

“The Exit Agreement is subject to confidentiality provisions.”

Take a look inside Huddersfield's new Leisure Centre below

We reported last month that Tesco had bought itself out of the deal to buy the council land bounded by Old Leeds Road and Southgate, which includes the two tower blocks of flats and the old sports centre, but both Kirklees and Tesco refused to reveal how much it was worth.

More detail has now emerged, with the council’s chief executive, Adrian Lythgo, exercising his emergency powers for the council to enter into an exit agreement for the parties to withdraw from the 2010 agreement of sale.

The result of Mr Lythgo’s decision means the council retains its land at Old Leeds Road plus any money paid by the retailer for it. Tesco also transferred other land to the council and they agreed “an appropriate financial settlement from Tesco to the council”.

Council papers say Mr Lythgo exercised his emergency powers as there was the potential that the transfer would be automatically triggered following the closure of the old sports centre.

Kirklees is now making plans to demolish the buildings on the site. Options for re-use will now be considered.