Germany's president, Christian Wulff, announces his resignation Reuters

The German president, Christian Wulff, has resigned after being caught up in a corruption scandal involving a dubious loan, an apparent attempt to block a report in a German tabloid and a string of apparently undeclared freebies.

Wulff, who had served as the head of state since 2010, stepped down on Friday after prosecutors said they had asked the German parliament to lift his immunity.

They said they had "factual indications" of Wulff's long-suspected improper ties to business executives.

The chancellor, Angela Merkel, cancelled a trip to visit the Italian prime minister, Mario Monti, in order to deal with the fallout.

Wulff, a member of Merkel's Christian Democratic Union party, had been her personal choice for president. His departure is an unwelcome distraction for the chancellor as she tries to control the spiralling debt crisis that threatens to tear Europe apart.

Germany's president has very little power, but the primary role of the largely ceremonial position is to serve as a moral authority, which is why Wulff had to go.

Giving his resignation speech from his official Berlin residence, Bellvue palace, he insisted he had "always acted correctly according to the law" but conceded that he had made mistakes.

He had lost the trust of the German people, he said, and had become a distraction from the issues of the day.

"Our land needs a president who can dedicate himself to national and international challenges," he added.

Merkel expressed her "personal deep regret" at Wulff's departure, in a statement delivered at the chancellery in Berlin.

"During his time in office, Christian Wulff was a energetic champion for creating a modern, open Germany," she said. "He gave us important reminders that the strength of our country lies in its diversity. This notion will remain linked with his name. He and his wife, Bettina, have served this country, the Federal Republic of Germany, with dignity."

She said Wulff's decision to step down ahead of a possible criminal investigation showed the strength of the German legal system – "that everyone is treated equally".

The chancellor said she hoped to begin talks with the opposition Social Democratic (SPD) party, as well as the Greens, to agree on a candidate to replace Wulff.

The 52-year-old Wulff has been embroiled in the slow-burning scandal since mid-December, when it emerged that he had received a large private loan from a wealthy friend's wife during his previous job as the governor of Lower Saxony.

That was followed in January by intense criticism over a furious call he made to the editor of Bild, Germany's biggest-selling newspaper, before it reported on the loan. Neither of those things, however, resulted in his investigation.

Prosecutors in Hannover, Lower Saxony's capital, said on Thursday there was now an "initial suspicion" that Wulff had improperly accepted or granted benefits in his relationship with David Groenewold, a film producer, and requested that Wulff's immunity from prosecution be lifted so they could pursue an investigation – an unprecedented move against a German president.

In a statement, they said Groenewold was also under suspicion.

Wulff has faced allegations that Groenewold, whose firm was granted a loan guarantee by Lower Saxony's government, paid for him and his wife to stay at a luxury hotel on the German resort island of Sylt in 2007.

His resignation is awkward for Merkel. Her centre-right coalition, which is prone to infighting, would have only a wafer-thin majority, meaning she might have to seek a consensus candidate with the opposition.

A special parliamentary assembly would have to elect a successor within 30 days.

While an initial suspicion of wrongdoing often does not lead to charges in Germany, the prosecutors' decision is a blow to Wulff, whose popularity and authority have been eroded during two months on the defensive.

Separately, Wulff's longtime spokesman, Olaf Glaeseker – whom he fired in December without explanation – is under investigation on corruption allegations in connection with the organisation of business conferences.

Earlier, Andrea Nahles, the general secretary of the Social Democrats, said her party would vote to lift Wulff's immunity and indicated that he should go.

"It has never happened before that German prosecutors consider it necessary to investigate a head of state," Nahles said. "From my point of view, investigations by prosecutors are not compatible with the office of president."

Wulff has drawn criticism for his handling of the affair, during which he has said little and often communicated through his lawyers.

He has said the call to the newspaper editor was a serious mistake, but has argued publicly with the publication over whether or not he was trying to block its report.

Wulff was a deputy leader of Merkel's conservative Christian Democratic Union before he became president. He replaced Horst Koehler, another Merkel nominee for the presidency, in mid-2010 after Koehler unexpectedly resigned, citing criticism attracted by comments he had made about the German military.