Horst Koehler, a former head of the International Monetary Fund, has been elected Germany's new president.
Mr Koehler's election is a victory for the opposition
He defeated Gesine Schwan, a university professor who hoped to become Germany's first female head of state.
The president is not elected directly by voters, but by a special federal assembly convened every five years.
Although the role is mostly ceremonial, Mr Koehler, who was backed by the opposition, has made clear he will push for economic reforms in Germany.
Mr Koehler, 61, replaces Johannes Rau, who is stepping down after a single five-year term.
First round victory
His election is a victory for the conservative opposition Christian Democrats, who backed him and are calling for a similar programme of economic reform.
Chancellor Gerhard Schroeder's government had backed Ms Schwan.
Mr Koehler was chosen by a federal assembly made up of around 1,200 politicians and public figures, including a majority of conservatives and liberals.
Until recently, he was largely unknown to the German public.
Was close ally of German Chancellor
Helped finance ministry manage German monetary unification in 1990
1998: Became head of European Bank for
Reconstruction and Development
2000: Made head of IMF
Mr Koehler said in his acceptance speech that he had spent the last six years abroad, and needed to spend time concentrating on Germany.
But he gave a hint that he intended to use his position to get things done, saying: "I can't hide my concerns about our economy. Germany has to
fight for its position in the world in the 21st century."
Mr Rau used his farewell speech to urge the nation to stop complaining, saying pessimism was damaging the economy and posing a threat to political stability.