Spanish bank Santander will exit the mortgage business in Germany and cut around 500 jobs in the country by the end of 2026 as part of a process to focus on more profitable activities, a spokesman for the bank told Reuters on Wednesday.

Germany is going through its worst real estate crisis in decades.

After years of boom, mortgage lending slowed sharply in Germany after a rapid rise in interest rates to kill inflation put would-be homeowners on the sidelines. The latest data show a stabilization of the market.

The headcount reduction to 3,600 employees will be spread across all of Santander Germany's businesses, such as its consumer banking, and the move will not involve a reduction in its 189-branch network.

"We will try to achieve the necessary job reductions through natural attrition as well as voluntary and early retirements," a spokesman said, adding that all Santander employees in Germany had been informed.

In Germany, Deutsche Bank, its biggest competitor, has also been streamlining its mortgage business, a move that is cutting hundreds of jobs.

In Germany, Santander, which has a mortgage loan portfolio of about 2.5 billion euros ($2.66 billion).

Santander Consumer in Germany posted a 41% decline in net profit last year to €264 million. Its return on equity (ROE), a measure of profitability, currently stands at 7.8%, below the group ROE of 11.91%.

(1 U.S. dollar = 0.9398 euros)

(Reporting by Jesús Aguado; additional reporting by Tom Sims in Frankfurt; editing by Andrei Khalip and David Evans; edited in Spanish by Benjamín Mejías Valencia)