BERLIN (AP) — A Swiss man was given a 22-month suspended prison sentence Thursday for spying on German tax officials for more than 3½ years.

The man had confessed to the Frankfurt state court that he accepted 28,000 euros ($33,000) from Switzerland's NDB spy agency to obtain information on tax officials in the German state of North Rhine-Westphalia.

The 54-year-old was identified only as Daniel M. in line with Germany privacy rules. The court took into account his confession in handing him the suspended sentence.

Prosecutors alleged that M. was tasked with identifying the German tax investigators who had obtained a data CD containing confidential Swiss bank client data and used the information to open multiple tax-evasion prosecutions.

The court said that M. worked for Zurich police and for a Swiss bank, then founded his own company in 2011. It said he got into contact with the intelligence agency via former police colleagues.

His spying took place between July 2011 and February 2015.

The finance minister of North Rhine-Westphalia, Germany's most populous state, said the Swiss agency's behavior was unacceptable and must not be repeated.

"We expect from Swiss authorities a complete rethink and clear signals that they will, in future, join unreservedly in the fight against international crime, tax evasion and terror financing," state Finance Minister Lutz Lienenkaemper said.