Former pro-democracy activist Joachim Gauck has been elected new president of Germany.

A wide majority of members of the German parliament backed him, with speaker Norbert Lammert saying he received 991 of the 1,232 ballots cast.

He said the ex-communist Left Party's candidate Beate Klarsfeld secured 126 votes, and there were 108 abstentions.

The new head of state, a largely ceremonial post in Germany, was elected by a special parliamentary assembly, consisting mostly of lawmakers from Parliament and the state legislatures.

The 72-year-old 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.

Gauck appeared moved as he accepted the election.

He said: "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."

"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."

He 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.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.