FRANKFURT (Reuters) - A Swiss man accused of spying on a German tax authority told a German court on Thursday that he had been paid by Swiss intelligence to find out the names, addresses and telephone numbers of tax officials.

The 54-year-old suspect, identified only as Daniel M., whose trial in Frankfurt started last week, is charged with spying on the German state of North Rhine-Westphalia’s (NRW) tax authority and some of its staff for nearly four years up to February 2015.

Prosecutors say he was trying to find out how German states obtained CDs containing details of bank accounts held secretly in Switzerland by Germans hoping to avoid tax, so that Swiss authorities could try to prosecute the tax officials involved for obtaining Swiss bank data.

They also say he placed a source within the tax authority, though Daniel M. said on Thursday this had never been a success.

The case has triggered outrage in Germany but Swiss authorities have defended their efforts to combat the theft of business secrets.

In a written statement by him read out by his lawyers, Daniel M. detailed how he had hired a Frankfurt-based private detective to obtain details of three NRW tax officials on behalf of the Swiss intelligence agency NDB and to find an inside source at the tax authority.

Swiss intelligence had paid Daniel M., a former Swiss police officer and bank security employee at Swiss bank UBS, 13,000 euros ($15,280) for the names, addresses and telephone numbers of the tax officials, the statement said.

The NDB paid another 60,000 euros for an inside source to “be a fly on the wall” at the tax authority, but Daniel M. said the private detective pocketed the money without ever finding such a person.

“I am certain now that there never was one,” he said in the statement. “I am ashamed, this business is very embarrassing.”

He added that he had been motivated by “a mixture of patriotism, outrage, a sense of adventure and a desire to make a profit”.

Prosecutors said last week they would agree to a suspended sentence of between 18 months and two years, plus a fine of 50,000 euros ($58,735) in cash, if the defendant provided “plausible” information on the case.

They have demanded that he name his inside source at the NRW tax authority and provide information on tens of thousands of euros in payments made to unidentified people in connection with his spying efforts.

Otherwise, Daniel M. could face a prison sentence of up to five years if convicted of espionage on behalf of a foreign state.

The German state of NRW has for years irritated Switzerland by buying data as part of a crackdown on tax evasion.