The circumanstances of Mr Herzog's election quickly led to questions about the mechanics of the presidential election itself.
Mr Herzog, candidate of Helmut Kohl's Christian Democrats, defeated his main opponent, Johannes Rau, candidate of the Social Democrats, with 696 to 605 votes in the third round of voting in an electoral assembly in the Reichstag - Germany's once and future parliament building, in Berlin. This was the first presidential election since German unity in 1990, and the first for 25 years in Berlin. After 1969, threats from the Soviet Union forced the vote to be moved from West Berlin to Bonn.
The message of yesterday's vote is twofold: Chancellor Kohl will be relieved that his candidate has pulled through. Mr Kohl had suffered political humiliation when his previous favourite, the east German Steffen Heitmann, was forced to withdraw because of his right-wing views, especially his perceived 'soft' approach to the country's Nazi past. But Mr Rau, Prime Minister of the west German state of North Rhine-Westphalia, was by far the most popular candidate, in the country at large, with more than twice as much support as Mr Herzog. Rudolf Scharping, the leader of the opposition Social Democrats, noted yesterday: 'This was a decision that went against the will of the majority of the people'
President Richard von Weizsacker, a Christian Democrat who is about to complete his second five-year term, has been widely praised on all sides. In recent months, however, the short-term needs of party tactics have played an important role. Party managers exerted considerable pressure before and during the secret vote. Parliamentary elections are due in October; much of the debate over the choice of president was conducted in the light of those elections.
Leading Social Democrats privately indicated in advance of yesterday's election that they might press for a change in the election rules if Mr Rau lost out to Mr Herzog.
Mr Herzog failed to gain the required absolute majority in the first two rounds of voting, where more than 120 votes went to the candidate of the Free Democrats, Hildegard Ham-Brucher. In the third round a relative majority is sufficient; Ms Ham-Brucher withdrew, to make the contest more clear cut. The independent east German candidate, Jens Reich gained 62 votes in the first round, before dropping out. He said that he felt his candidacy had been justified, by proving that it was possible to be a non-party candidate 'without attracting ridicule'. The far-right Republican Party put up their own candidate, Hans Hirzel, at the last moment, primarily as a publicity stunt. Mr Hirzel gained just 11 votes.
Yesterday's specially created mini-electorate consisted of all 662 federal MPs, plus the same number of delegates nominated by the 16 state parliaments, according to the parties' respective strengths.
All four main candidates have sought to avoid obvious conflicts, and thus to retain the dignity of the post. Nonetheless, Mr Herzog too, stumbled into controversy. His comments in an interview with Focus magazine this month, suggesting that foreigners who do not wish to take German citizenship should think of returning to their own countries, caused unease in the ranks of the Free Democrats, and led to harsh criticism from the Social Democrats.