FRANKFURT (Reuters) - Deutsche Bank DBKGn.DE will buy back more than $5 billion in senior debt, it said in a statement on Friday, sending its shares higher.

The headquarters of Germany's Deutsche Bank is photographed early evening in Frankfurt, Germany, January 26, 2016. REUTERS/Kai Pfaffenbach

A person familiar with the matter said that Germany’s flagship lender launched the tender after assessing that the market was pricing its bonds incorrectly.

The yields of some of the benchmark bonds had more than doubled since the lender posted a record loss in late January.

Deutsche Bank’s shares extended gains and traded up more than 10 percent amid a strong rebound in European bank shares following positive results from Commerzbank and a rally in oil prices.

Deutsche Bank has had 215 billion euros in liquidity reserves, of which 50 billion euros are in senior debt.

The tender applies to about 20 billion euros of the senior debt but may be increased if the demand to sell turns out to be higher than expected, the person familiar with the matter said.

Under the tender Deutsche Bank will seek to buy euro-denominated unsecured bonds worth 3 billion euros ($3.38 billion) and dollar-denominated bonds worth $2 billion.

“By repurchasing this debt below its issue price, the bank realizes a profit”, Chief Financial Officer Marcus Schenck said.

He added that Deutsche Bank was able to repurchase the bonds without altering its 2016 funding plan, having already completed 4 billion euros of its full-year funding plan of up to 35 billion.

Junior debt is not part of the buyback program.

Ratings agency Standard and Poors on Thursday downgraded some of Deutsche Bank’s junior debt saying the change ‘with a stable outlook’ reflected the expectation that the Frankfurt-based bank would make steady progress during the next two years toward its financial and operational targets for 2020.

On Monday Deutsche Bank had said it had “sufficient” reserves to make due payments this year on so-called Additional Tier 1 (AT1) capital securities, seeking to calm investors after its shares had plunged.