FRANKFURT (Reuters) - Germany's Commerzbank CBKG.DE has become the target of a tax evasion probe in which several current and former managers are suspected of evading 40 million euros ($47 million) in taxes via so-called dividend stripping.

A Commerzbank logo is pictured before the bank's annual news conference in Frankfurt, Germany, February 9, 2017. REUTERS/Ralph Orlowski

Prosecutors said on Friday they had searched the offices of a major Frankfurt bank and private homes this week.

The bank involved was Commerzbank, according to a person familiar with the matter who was speaking on condition of anonymity.

Commerzbank, Germany’s second-biggest lender, said it was cooperating with authorities.

Dividend stripping, also known as “cum-ex” transactions, involved buying a stock just before losing rights to a dividend, then selling it, taking advantage of a now-closed legal loophole that allowed both buyer and seller to claim tax credits.

Frankfurt prosecutors, together with federal crime police and tax officials, conducted the Commerzbank searches on Tuesday. They included the offices of the bank as well as the flats of three suspects in Frankfurt and nearby Hanau.

The legal news agency Juve first reported the news.

Investigations into the use of such schemes by a number of banks in Germany have been going on for several years. The practice may have cost the state billions of euros in tax over many years.

Last year, Portigon Financial Services WDLGge.F, formed from parts of failed German lender WestLB, was searched by prosecutors as part of a probe into allegations that WestLB may have been involved in cum-ex trades..

Last month, prosecutors raided the Frankfurt offices of law firm Freshfields Bruckhaus Deringer in relation to a former client’s cum-ex transactions. A number of banks have already paid hundreds of millions of euros in back taxes and tens of millions to settle disputes with German authorities.

Last year, German financial watchdog BaFin closed the German operations of Maple Bank due to over-indebtedness relating to the tax evasion investigations.

The Commerzbank investigation focuses on five current and former employees aged between 51 and 63, as well as unknown individuals suspected of involvement in the scheme to evade 40 million euros of taxes from 2006 to 2010, prosecutors said.

The investigation also extends to unknown individuals and trades in 2008 at Dresdner Bank, which was taken over by Commerzbank in 2009. Prosecutors said the volume of those trades was more than 10 billion euros, with a further 75 million euros in evaded taxes.

In a statement on Friday, Commerzbank said it had identified cum-ex trades at Dresdner Bank that it halted upon the 2009 takeover. Commerzbank also said it conducted a voluntary investigation at the end of 2015 into all trades between 2003 and 2011 that “revealed that there were cum-ex trades at Commerzbank.”

Commerzbank said it proactively notified the authorities with the preliminary results of that investigation and is cooperating fully.

Shares of Commerzbank dipped on the news midafternoon, but recovered somewhat to trade 0.7 percent lower at 1613 GMT.

($1 = 0.8590 euros)