FRANKFURT/BERLIN- Prosecutors and tax investigators are investigating 417 suspected cases of so-called dividend stripping in Germany that resulted in 5.3 billion euros ($6.34 billion) of unpaid taxes, the German finance ministry confirmed on Thursday.

The Munich newspaper Sueddeutsche Zeitung and public broadcasters NDR and WDR reported the tally on Wednesday.

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.

Investigations into the use of such schemes by a number of banks in Germany have been going on for several years.

"The matter is complex, and the perpetrators are well advised. That is why the investigations are taking a long time and are tedious," Thomas Schaefer, finance minister of the German state of Hesse, said in a statement. "But they are absolutely necessary and so far successful."

Of the 5.3 billion euros of unpaid taxes, the federal and state governments are already in the process of reclaiming 2.4 billion, the German finance ministry said.

($1 = 0.8361 euros)

(Reporting by Christoph Steitz, Klaus-Peter Senger, Tom Koerkemeier and Tom Sims; Editing by Mark Heinrich) ((christoph.steitz@thomsonreuters.com; +49 69 7565 1269; Reuters Messaging: christoph.steitz.thomsonreuters.com@reuters.net))