Linklaters and Allen & Overy (A&O) have taken lead roles on Lloyds TSB's £12.2bn rescue takeover of the UK's largest mortgage lender HBOS.

Linklaters is advising Lloyds on the merger, which was put together in a matter of days last week, following HBOS's share price collapse after Lehman Brothers' shock bankruptcy filing.

The magic circle law firm, which is a regular adviser to Lloyds, is fielding a team under relationship partner Jeremy Parr and corporate partner Duncan Barber.

Competition partners Michael Cutting and Bill Allan are also involved in the deal, which has attracted some criticism because of the Government's decision to introduce emergency legislation allowing the merger to override competition hurdles.

Meanwhile, A&O has secured the main role for HBOS, with the firm fielding a team under relationship partner Alistair Asher. London corporate partner David Broadley and antitrust partner Mark Friend are also assisting.

A&O is HBOS's main corporate adviser. Its mandate for the stricken lender came only months after the law firm was appointed to advise the bank on its £4bn rights issue earlier this year. Both Broadley and Asher were involved in that earlier fundraising.

Full details of the bank merger were released on 18 September when Lloyds revealed that it was expecting to generate around £1bn of cost savings a year by 2011 through the deal.

Head office including the legal, human resources, risk and finance departments are among those facing consolidation at the bank.

HBOS was formed in 2001 through the merger of Halifax and Bank of Scotland. By the end of June this year, it held 20% market share of the UK residential mortgage market, with overall revenues for the year ending December 2007 hitting £21.3bn.

At the time of going to press, Scottish counsel for the banks were still to be instructed.

Linklaters' instruction for Lloyds came just days after the firm was appointed to advise PricewaterhouseCoopers as administrators on Lehman's bankruptcy in the UK.

On that deal, the firm is fielding a heavyweight team led by restructuring chief Tony Bugg, banking partner Richard Holden and corporate partner David Ereira.