Schroeder, visibly relieved after a long and close night of vote-counting that at times looked like unseating him, came to his party headquarters arm in arm with Foreign Minister Joschka Fischer of the Greens to pledge: "We have hard times in front of us and we're going to make it together."
The final official result showed the Social Democrats and the conservatives neck in neck with 38.5 percent of the vote each. But the unexpected success of the Greens, with 8.6 percent, gave the governing coalition a narrow new majority of nine seats in the Bundestag, Germany's parliament. They will have 306 of the 603 seats, compared to 297 for other parties.
The Social Democrats and Greens combined won 47.1 percent of the vote, and this won the right to govern for another four years. Conservatives led by Bavarian Premier Edmund Stoiber and the centrist and pro-business Free Democrats, with 7.4 percent, had a total of 45.9 percent of the vote.
The ex-Communists of the former East Germany, running as the Party of Democratic Socialists, won just two seats and 4 percent of the vote, short of the 5 percent threshold required to gain extra seats under Germany's system of proportional representation. Various extreme right-wing parties fared even worse, winning no seats and barely 3 percent of the vote between them.
Following last Sunday's re-election of the Social Democrats in Sweden, Schroeder's re-election has firmly stopped what was looking earlier like a conservative tide sweeping Europe, after left-of-center parties were voted out of office in Austria, Italy, France, Holland and Denmark.
But the closeness of the German result left the new government looking fragile, and Stoiber predicted early Monday that the majority was too small to work, and too unstable to last.
"Should the result not allow us to form a government, then I predict before you that this Schroeder government will rule for only a very short time," Stoiber said. "We will continue to state: This (Social Democratic-Greens) coalition will not heal our country's economy and further there will be no release from the isolation from Europe and the United States.''
Schroeder, whose comeback in what looked like a losing campaign was helped by his strident opposition against war with Iraq, said Monday that he will not commit German troops to a possible conflict with Iraq, even with a U.N. mandate.
"I have formulated a German position, and I have nothing to retract on that count,'' Schroeder said.
But party officials later said that there would be no place for Justice Minister Herta Daeubler-Gmelin in the new government, after she rocked the campaign's final days with an incautious speech that seemed to compare President Bush with Adolf Hitler, suggesting both used threats of war to deflect attention from domestic concerns. She claimed to have been misquoted, but American outrage at the remark seems to have doomed her political future.
Even more challenging than repairing the rift with Washington is the looming crisis with Germany's partners in the euro, Europe's new single currency. Germany delayed publishing its budget deficit figures until after the election, fearing it would breach the maximum level allowed under the rules of the eurozone's Stability Pact. If budget deficits exceed 3 percent of gross domestic product, an offending country faces fines of up to 0.5 percent of GDP. In Germany's case, that means fines of up to $10 billion.
The German economy is heading back into recession, and the higher spending on paying for more and more unemployed. Combined with lower tax revenues, this spending means the Stability Pact is almost certain to be breached. And even though France is also seeking some relaxation from the pact's tight rules, other members of the euro currency have said they refuse to change it, fearing a loss of credibility in world currency markets.