German lawmakers elected Joachim Gauck, a former Lutheran pastor and human rights activist from communist East Germany, as president of the European Union's largest country on Sunday by a large majority in a first round of voting.
Norbert Lammert, speaker of the lower house of parliament, the Bundestag, said Gauck, 72, had won 991 votes in the federal assembly of national and regional lawmakers that is charged with choosing Germany's largely ceremonial head of state.
His main rival, former Nazi-hunter and journalist Beate Klarsfeld, won 126 votes.
Chancellor Angela Merkel reluctantly accepted Gauck for the mainly ceremonial post after her coalition ally joined opposition parties last month in backing him to replace Christian Wulff, who resigned in a scandal over financial favors.
Unlike Wulff, a former lawmaker from Merkel's ruling centre-right Christian Democrats (CDU), the 72-year-old Gauck has no party affiliation. But he is known for speaking his mind - with the eloquence of a seasoned preacher - on controversial issues.
Eighty percent of Germans trust Gauck, a former Lutheran pastor and human rights activist, according to an opinion poll by Infratest published on Saturday.
Yet two thirds said they thought he would be an "uncomfortable" president for the country's political parties.
In Germany, the president is chosen not by voters but by a special federal assembly comprising all 620 members of the Bundestag lower house of parliament and an equal number of delegates from the country's 16 regions.
Gauck's election is assured as he has the support of the three ruling coalition parties including the CDU and of the opposition Social Democrats and Greens.
"We expect a big majority (for Gauck)," said Frank-Walter Steinmeier, leader of the opposition Social Democrats.
His only opponent is Beate Klarsfeld, 73, an anti-Nazi activist endorsed by the small Left Party.
The German head of state has little executive power but is supposed to provide moral leadership, a role for which Gauck, a prominent figure in the peaceful protest movement that led to the fall of the Berlin Wall in 1989, seems well-suited.
"The president of the federal republic must be the guardian of the soul of our nation," said Sunday's edition of the top-selling daily Bild which also backed Gauck for the job in 2010.
"Gauck's most important task is to restore dignity to this considerably tarnished office."
Merkel and Gauck both hail from formerly Communist East Germany where her father was also a clergyman. They are said to have a good personal rapport, but she blocked a bid to install him as president in 2010 in favor of the ill-fated Wulff.
Gauck has a rich life story shaped by the Cold War. When he was 11 his father was sent to the Siberian Gulag for alleged espionage and did not return for four years.
That experience fostered an abiding aversion to totalitarianism, and he has said freedom will be the leitmotif of his presidency.
After the fall of Communism and Germany's reunification, Gauck oversaw the archives of the dreaded Stasi, the East German secret police, earning recognition for exposing their crimes.
As a purely symbolic head of state, Gauck poses no threat to Merkel's domination of German politics. But his moral authority and rhetorical gifts may dim some of her luster on the public stage.