Spain's third-largest bank has agreed to pay 178 million euros ($212.85 million) for that stake - valuing each BPI share at 1.45 euros - for a premium of 22.67 percent to the stock's closing price on May 4.

Caixabank said in a statement it would buy another 8.4 percent stake from the Portuguese arm of insurer Allianz, taking its stake to 92.935 percent. It originally took over BPI in February 2017 in a bid to boost revenue.

Subsequently, Caixabank will ask BPI's board to de-list its shares. If the Portuguese bank approves the request, Caixabank will offer to buy all the remaining stock.

Caixabank said it would offer 149.25 million euros for the second tranche of shares, valuing them at the same level as the Allianz quota.

The first purchase will knock Caixa's fully-loaded CET 1 capital ratio - a key measure of financial strength - down an estimated 20 basis points to 11.4 percent, the bank said.

($1 = 0.8363 euros)

(Reporting by Jesús Aguado, writing by Isla Binnie, editing by Larry King)