BERLIN - A far-reaching majority of lawmakers elected former East German pro-democracy activist Joachim Gauck as Germany's new president Sunday.

The 72-year-old Gauck, who enjoyed the backing of most major parties, received 991 of the 1,232 ballots cast, parliamentary speaker Norbert Lammert said. The ex-communist Left Party's candidate Beate Klarsfeld secured 126 votes, the far right NPD party's candidate Olaf Rose only three, and there were 108 abstentions.

Gauck is a former pastor who opposed East Germany's then-communist regime and became head of a federal agency overseeing the files of the Communists' ubiquitous domestic intelligence service after Germany's reunification in 1990.

Gauck appeared moved as he accepted the election to become the country's new head of state, a largely ceremonial role in Germany that has little executive power but is considered an important moral authority.

"I accept this duty. After the long political meanders of the 20th century, I do so with the infinite gratefulness of a person who has finally and unexpectedly found his home again and who had the pleasure of participating in a democratic society over the past 20 years," Gauck told the assembly.

"Very certainly I won't be able to live up to all expectations," he said. "But there is one thing I can promise: I say yes with all of my force and with my heart that I will carry out the responsibility you entrusted to me today."

Gauck, who has no political affiliation, won wide backing from Germany's mainstream parties for the presidency after predecessor Christian Wulff resigned in a corruption scandal last month.

When he was nominated, Chancellor Angela Merkel described Gauck as "a true teacher of democracy." Gauck had run for the opposition against her candidate, Wulff, two years earlier, but Merkel's junior coalition partner pushed her to accept him as president at the second attempt.

On Sunday, Merkel said Germany can be proud of its new president, who was elected with a "very convincing result."

The chancellor, another former East German, also said that Gauck's election was a sign of the success of Germany's reunification.

"We can also be a little proud of that," Merkel said, adding that more progress was still required to see eastern Germany catch up fully with the wealthier western part.