A special assembly elected former German foreign minister Frank-Walter Steinmeier by an overwhelming majority Sunday to be the country's new president.
Steinmeier was elected in Berlin by the assembly made up of the 630 members of parliament's lower house and an equal number of representatives from Germany's 16 states.
He received 931 of the 1,260 votes. Steinmeier succeeds Joachim Gauck, a 77-year-old former pastor and East German pro-democracy activist who did not seek a second five-year term because of his age.
The German president has little executive power, but is considered an important moral authority and symbol of the country as its host for visiting dignitaries.
"Let's be brave, because then we don't have to be afraid of the future," Steinmeier said in his acceptance speech.
He said the world faces "rough times," but that Germany, as a functioning democracy, had the responsibility to fight for stability.
"Isn't it actually wonderful, that this Germany, our difficult fatherland, that this country has become an anchor of hope in the world for many," after overcoming wars and totalitarianism, Steinmeier said.
Steinmeier is normally studiously diplomatic, but he strongly criticized Donald Trump during the U.S. election campaign. Asked in August about the rise of right-wing populism in Germany and elsewhere, Steinmeier criticized those who "make politics with fear."
He cited as examples the nationalist Alternative for Germany party, the promoters of Britain's exit from the European Union, and "the hate preachers, like Donald Trump at the moment in the United States."
Steinmeier, a 61-year-old Social Democrat, had the backing in the election of German Chancellor Angela Merkel's "grand coalition" of center-right and center-left parties.
Merkel congratulated him on Sunday and said she was convinced he would be an excellent president who would enjoy wide support.
"This is a good day for Germany," she said.
The presidential vote was likely one of the last moments of coalition unity ahead of a parliamentary election in September in which Merkel is seeking a fourth term. Both sides hope to end the "grand coalition."- culled form yahoo news