FRANKFURT (Reuters) - German property lender Aareal Bank will book a gain of around 2 billion euros ($2.14 billion) after it sells its tech unit Aareon to private equity firm TPG and investor CDPQ, it said in announcing the deal on Monday.

Aareal, based in Germany but operating globally, said it would only realize the gain later this year when the deal closes.

In the meantime, it will incur transaction costs of 150 million euros in the second quarter. In the first quarter, the bank generated a net profit of 73 million euros.

Aareal has been navigating a global crunch in commercial real estate. It has a quarter of its business in the United States, which has been especially rocked by the downturn.

Advent, Aareal's co-owner, is maintaining a stake in Aareon.

The owners of Aareal lined up advisers to sell the division, Reuters reported in March.

Aareal said that the transaction was based on an enterprise value for Aareon of 3.9 billion euros.

($1 = 0.9335 euros)

(Reporting by Tom Sims, editing by Miranda Murray and Thomas Seythal)