The German Chancellor, Mr Gerhard Schröder, was last night hopeful of remaining in power after the closest general election in German history.
The ruling Social Democrats (SPD) lost support overall but were buoyed up by a strong showing from their coalition partners, the Greens.
After an extraordinary evening with hourly reversals of fortune, the government appeared increasingly likely to return to power with only the narrowest of majorities - perhaps as little as one or two seats.
"We fought a good fight and it looks like we will make it. We're crossing our fingers," said a subdued Mr Schröder to supporters yesterday evening.
He admitted his party's drop in support of three percentage points was "very painful" but said he was determined to build a new coalition with the Greens no matter how narrow the majority.
The Green Party was also confident of a return to power last night after capturing nearly nine per cent support, its best election result ever. Mr Joschka Fischer, the Foreign Minister, said: "At the end we will have the majority but it's going to be an exciting evening."
A nail-biting night began as soon as polls closed at 6 p.m., when Germany's two public television networks broadcast contradictory exit polls.
One predicted a new government, the other a return of the Social Democrat-Green administration.
By late evening the SPD and the opposition CDU had 38.1 and 38.9 per cent respectively, an amazingly close result after a bitter election campaign.
The Christian Democrats (CDU) emerged early on as the biggest single winner, increasing its support by four percentage points.
"We won the election and the Christian Democrats are once again the strongest political force in Germany.
"We will do what we can with this result," said Mr Edmund Stoiber, the CDU leader.
However, Mr Stoiber said he was keeping the champagne on ice as it became clear that his likely coalition partner, the the liberal Free Democrats (FDP) had fared badly.
The FDP had hoped to be a kingmaker with either the SPD or CDU, but remained in fourth place behind the Greens.
Mr Stoiber ruled out a grand coalition with the SPD yesterday, calling it "a coalition to nowhere".
If the SPD returns to power it will be the most remarkable comeback in German political history. Last month the party was five points behind the opposition in opinion polls.
But Mr Schröder's handling of the floods crisis and his opposition to military action in Iraq brought his party neck-and-neck in the final two weeks.
The government's re-election hopes received an extra boost last night when it appeared that the reformed communist party, the Party of Democratic Socialism (PDS), had failed to reach the five-per-cent level required for parliamentary representation.
The exact make-up of the next parliament, and the number of seats required for an absolute majority, remained unclear last night.