The boards of caixabank and bankia have agreed a merger to form spains largest bank, with assets of more than 650bn, after the coronavirus pandemic exacerbated pressure for long-awaited consolidation in the sector.

Details of the agreement, which will still need to be approved by shareholders, are due to be made public on friday. the banks announced on thursday evening that they would hold a joint press conference at caixabanks headquarters on friday.

The transaction in effect represents an acquisition by caixabank of bankia, a state-controlled bank that played a prominent role in spains financial crisis when madrid injected 22.4bn to remedy a vast capital shortfall in 2012.

A combined caixabank-bankia would become spains largest lender by market share in domestic loans and deposits, although it would not have the extensive overseas operations of santander and bbva, at present the countrys two largest banks.

The banks first announced they were discussing a potential combination earlier this month. negotiations have since focused on the premium to be paid by caixabank for bankia shares, the corporate structure of the new banks, and the holdings of the two banks chief shareholders.

Caixabanks largest shareholder is the la caixa foundation, which is among europes biggest charities. one of its priorities has been to prevent its 40 per cent stake in caixabank from falling below 30 per cent of the new entity, partly for tax reasons.

Meanwhile the spanish states 62 per cent stake in bankia is expected to translate into around 14-15 per cent of the enlarged group.

Bankia chairman jos ignacio goirigolzarri made clear his interest in consolidation in an interview with the financial times in 2018. but the impetus for spanish banks to combine has increased over the past year because of the impact on income of the european central banks ultra-loose monetary policy and the fallout of the coronavirus pandemic, which has hit the spanish economy particularly hard.