German president Christian Wulff announced his resignation on Friday amid mounting criticism over a home loan scandal.
His resignation came a day after the prosecutors had asked the parliament to lift his immunity from prosecution.
Wulff has been accused of accepting favours during his time as governor of Lower Saxony.
"I am … today stepping down from the office of federal president to free up the way quickly for a successor," he said in a televised statement from his Bellevue palace.
He said that corruption allegations which have mounted over the past weeks and the ensuing lack of trust had made his position untenable.
Wulff said that Germany needed a president which could meet these challenges unrestrictedly, with the trust of "not just a majority but a broad majority of citizens".
"The events of the past days and week have shown that this trust and therefore my influence have been lastingly damaged," he said.
Earlier in the day, German Chancellor Angela Merkel had called off her Rome visit to handle the unprecendeted crisis in the country.
The development has caused new headche to Merkel whose coalition government, which has only thin majority and is currently concentrated in fighting euro crisis.
Speaking minutes after Wulff announced his resignation, Merkel said that she has accepted his resignation with respect but also with deep regret.
She said that she would seek an agreement with Germany\\\’s main opposition parties on a new head of the state.
Merkel said the parties in her centre-right coalition will consult among themselves and then immediately approach the opposition Social Democrats and Greens.
Wulff had been in the job for lesst than two years and Merkel was the one who had proposed his name for the presidency in 2010.
The scandal first emerged in December with the news that Mr. Wulff, while serving as governor of the state of Lower Saxony, had taken a low interest private loan from the wife of a wealthy friend worth about USD 650,000.
He is the second president to step down within two years. His predecessor, former International Monetary Fund chief Horst Koehler, resigned unexpectedly in 2010 after coming under fire for comments he made about the German mission in Afghanistan.