German President Horst Koehler has been re-elected for a second five-year term.
Correspondents say Mr Koehler's re-election is a symbolic victory for Chancellor Angela Merkel ahead of national elections in September. Federal and state parliamentarians re-elected Mr Koehler over a strong challenge from Gesine Schwan of the centre-left Social Democrats.
The post of president is largely ceremonial but carries considerable moral authority.
Mr Koehler, 66, is a former head of the International Monetary Fund and a member of the chancellor's Christian Democratic Union.
Parliament President Norbert Lammert said Mr Koehler won 613 votes from the special parliamentary assembly in the Reichstag to achieve a slim majority. The 1,224-member assembly comprises lower-house politicians and delegates nominated by Germany's 16 state legislatures. The closest challenger was Gesine Schwan of the center-left Social Democrats, who won 503 votes.
That's actually a much closer result than I expected. Even more so since the leftist party's candidate also received 91 votes.
And we almost would have had two women in charge. That would have also been cool. :(