BERLIN (AP) -- Germany's president resigned Friday in a scandal over favors he allegedly received before becoming head of state, creating a major domestic distraction for Chancellor Angela Merkel as she grapples with Europe's debt crisis.
Chritian Wulff announced his resignation a day after the slow-burning affair escalated dramatically with a request by prosecutors for Parliament to lift his immunity from prosecution over his relationship with a film producer in his previous job as governor of Lower Saxony. Those benefits allegedly included paying for a luxury hotel stay in 2007.
Wulff said Germany needs "a president who is supported by the confidence not just of a majority of citizens, but a wide majority."
"The developments of recent days and months have shown that this confidence, and therefore my ability to act, have been lastingly impaired," a somber Wulff said in a brief statement at the president's Bellevue palace, with his wife, Bettina, at his side.
Merkel, who called off a trip to Rome to address the situation in Berlin, voiced "deep regret" at his resignation. She moved quickly to limit the fallout and try to ensure a smooth succession, saying she would seek an agreement with the main opposition parties on the next president.
Wulff is stepping down after less than two years in the job. He was Merkel's candidate for the largely ceremonial presidency in 2010; before that, he was a deputy leader of her conservative party and the governor of Lower Saxony state.
The speaker of the upper house of Parliament -- Bavarian governor Horst Seehofer, a member of Merkel's conservative bloc -- now takes over the presidential duties on an interim basis, mostly signing legislation into law.
A special parliamentary assembly made up of lower-house lawmakers and representatives of Germany's 16 states will have to elect a successor within 30 days.
Merkel's center-right coalition, which is prone to infighting, has only a wafer-thin majority in that assembly.
The chancellor quickly signaled she didn't want to risk failing to get a candidate elected, saying the governing parties will consult among themselves and then immediately approach the opposition Social Democrats and Greens.
"We want to conduct talks with the aim, in this situation, of being able to propose a joint candidate for the election of the next German president," Merkel told reporters.
It wasn't immediately obvious who might attract consensus support. Wulff emerged as president from a messy election in 2010 in which the opposition's candidate, well-regarded former East German human rights activist Joachim Gauck, drew several votes from Merkel's coalition.
The Wulff scandal hasn't yet had any impact on Merkel's popularity, which has been running high amid her hard-nosed leadership of the eurozone debt crisis.
"Wulff's resignation should not have any direct impact on German economic policies (or) on the debt crisis management," said Carsten Brzeski, an economist at ING.
The primary role of Germany's president is to serve as a moral authority, and Wulff's authority already had been eroded before prosecutors in Hannover, Lower Saxony's capital, made their move on Thursday.
They asked for Parliament to lift Wulff's immunity -- an unprecedented move against a German president -- saying there is "initial suspicion" that Wulff improperly accepted benefits from a German film producer friend, David Groenewold. The prosecutors said Groenewold is also under suspicion.
It was the latest in a steady drip of allegations that have besieged the president over the past two months.
The affair kicked off in mid-December, when it emerged that Wulff had received a large private loan from a wealthy businessman friend's wife in his previous job as state governor.
That was followed in January by intense criticism over a furious call he made to the editor of Germany's biggest-selling newspaper before it reported on the loan. Neither of those things, however, resulted in an investigation.
Wulff said in his resignation he was convinced he would be fully cleared of any wrongdoing.
"I have always behaved legally correctly in the offices I held," he said. "I have made mistakes, but I was always honest."
Wulff's longtime spokesman, Olaf Glaeseker -- whom the president fired in December -- is also under investigation on corruption allegations in connection with the organization of business conferences.