German insurer Allianz has emerged as the frontrunner to invest in the bancassurance business of Spanish lender BBVA, two sources close to the deal told Reuters, after Italian rival Generali pulled out of the race.

The deal is worth more than 1 billion euros ($1.1 billion)and is expected to be sealed by the end of the year, the sources said.

If successful, it would give Allianz a platform to revive its Spanish distribution network after a previous agreement with Banco Popular came to an end following Popular’s sale to Santander in 2017.

BBVA’s entire insurance network provides everything from life to health, home and car insurance.

But Allianz still faces competition from U.S. rival Liberty Mutual, which started looking into a possible bid earlier this year and remains in the race, the sources said.

Allianz, Generali, Liberty Mutual and BBVA declined to comment.

Generali decided not to go ahead with an offer due to doubts whether the investment would prove sufficiently profitable, the sources said.

Presenting a new three-year plan in November, Generali earmarked up to 4 billion euros for acquisitions and growth, as it looks to asset management and high-margin business in Latin America and Asia to fuel earnings.

Generali’s withdrawal, which was first reported by Italy’s Il Sole 24 Ore, is weakening BBVA’s negotiating power for a deal which is expected to be structured as a partnership or a joint venture agreement within a network of insurers across Spain, Mexico and Latin America, the sources said.

($1 = 0.9181 euros) (Additional reporting by Giulio Piovaccari.)