Banco Santander SA agreed to pay 937 million euros ($1.1 billion) to buy Allianz SE out of an insurance joint venture in Spain, more than halving the value of the German insurer’s assets under management in the country.

Aegon NV and Mapfre SA are now set to become Santander’s insurance partners in Spain. Aegon is expected to purchase 51% in a joint venture that will sell life risk, health, accidents, home and other non-life products through Santander’s network. Mapfre is acquiring a 50% stake in a partnership to sell car insurance and insurance for small- and medium-sized businesses.

The move marks another step in the consolidation of Banco Popular, which had been in partnership with the German insurer before Santander bought it in 2017. The Spanish bank last week agreed with unions to cut 3,223 jobs in the country as part of the integration of the failed lender.

Allianz will remain active in Spain. Europe’s biggest insurer manages about 7 billion euros of assets outside the Allianz Popular joint venture. In 2018, it gathered about 700 million euros of premiums through its direct business, twice the 362 million euros of policies that came through Allianz Popular.

Top 10

The end of the joint venture will knock Allianz out of the top 10 life insurers in Spain, an unusual position for the German company. Allianz has an annual budget for acquisitions of about 1.5 billion euros, according to a spokesman.

“If opportunities come along and they are in the right segment of the market, we will look at them,” Allianz spokesman Holger Klotz said by telephone.

Santander said it expects the transaction to occur in in the first quarter of 2020 and that it will have a negative impact of 8 basis points on its CET1 ratio. The lender fell 0.3 percent at 1:19 p.m. in Madrid, while Allianz was little changed in Frankfurt.

Popular collapsed in 2017 after failing to repair a balance sheet weighed down by loans that soured during Spain’s real estate crash. Santander agreed to take on the bank, acquiring it for 1 euro.

In Spain, life insurance is typically distributed through banks. Allianz and Banco Popular created the joint venture to sell life insurance, asset management, non-life insurance products and pensions in Spain. With the European Central Bank set to extend its monetary policy of negative interest rates for the foreseeable future Spanish banks are looking for alternative revenue streams to generate profit.

Allianz spent $1 billion last month on two deals in the U.K. general-insurance market.