Bob Diamond was going to be called as a witness by Guardian Care Homes in its case against Barclays over Libor fixing and IRSA mis-sellingReuters

Barclays has settled its complex and lengthy court case with Guardian Care Homes relating to allegations of mis-selling financial products and Libor fixing.

The deal is a last-minute reprieve for the former Barclays chief executive Bob Diamond, who resigned amid the Libor scandal and faced being called as a witness in the GCH case.

GCH, a care home operator in the UK, took Barclays to court in a £70m case on the claim that the bank had mis-sold it two interest rate swap agreements (IRSA) linked to Libor, a key benchmark rate, during 2007 and 2008.

The original claim had been solely on the mis-selling charge. But the Libor fixing angle was added after the scandal broke, engulfing Barclays among other financial institutions.

It emerged that the bank's traders had attempted to manipulate Libor. Lawyers for GCH argued that this made the IRSAs void.

Under the settlement, Barclays will restructure around millions of pounds of its loans to Graisley Properties, the parent company of GCH. Graisley has withdrawn its litigation as a result. The exact details of the settlement have not been revealed.

Other former senior executives as well as Diamond, including ex-chief investment officer Rich Ricci, were set to be called as witnesses by GCH.

Barclays had refuted the GCH claims, adding that the firm had its own financial advisers.

In June 2012, Barclays was fined £290m by the US Commodity Futures Trading Commission, US Department of Justice and the UK's Financial Services Authority for attempting to manipulate Libor.

It avoided a €690m fine from the European Commission for blowing the whistle on a Libor-fixing cartel with three other major banks.