As another batch of final ballots were counted in Nevada overnight, all eyes were on the western state - it had become the unlikely epicentre of a major political drama. As the count was completed, the Democratic senator in Nevada, Catherine Cortez Masto, was announced the winner in her re-election bid. It was by the narrowest of margins, but the news ricocheted across American politics. The victory by Ms Cortez Masto has huge political significance. It guarantees that Democrats hold 50 seats in the 100-seat chamber and therefore gives them the majority in the US Senate (Vice President Kamala Harris also has a vote and can break any ties).
Democrats are now giddy with success. They won tough senate battles in Pennsylvania, Arizona, and now Nevada.
President Biden and his team can barely believe they have outperformed expectations to this extent. They have overcome a long-standing trend that the governing party takes a major hit in midterm elections. No wonder President Biden described himself as "incredibly pleased," adding: "I feel good, and I am looking forward to the next couple of years."
As well he might. He can now be certain of appointing judges (including, potentially, Supreme Court justices) and getting other high-profile government officials confirmed.
Controlling the Senate also means shaping the political and policy agenda. Democrats will chair all the key committees.
Speaking from Cambodia, Biden said: "I feel good and I'm looking forward to the next couple of years."
The president said winning a 51st seat from the Georgia runoff would be important and allow Democrats to boost their standing on Senate committees. "The bigger the number, the better,” he said.
Control of the House of Representatives is still unclear, as some contests are too close to call. But even if Republicans do win the House, it will be a tiny margin, meaning that they will be preoccupied keeping their politically unruly members of Congress in order. Republicans' potential to cause mischief and to launch multiple investigations - and possible impeachments - into Biden will be much reduced. The big picture is that it gives Biden a huge morale-boost halfway through his first term. It is also a major defeat for Donald Trump and his far right conspiracists. Many of the most prominent election deniers lost their contests. It appears America's centre ground and its independent voters emerged from a long slumber and sent a message that extremism isn't going to be rewarded.
As Senator Chuck Schumer, the Democratic leader of the senate, put it last night: "This is vindication for Democrats, our agenda, and the American people."
He added: "The American people rejected the anti-democratic extremist MAGA Republicans." Biden now has a spring in his step as he heads towards the G20 summit. It was widely assumed that he would be licking his wounds and facing an exhausting and debilitating final two years in the Oval Office. To everyone's astonishment, just before he becomes an octogenarian (Biden turns 80 on November 20th), he has political life left in him.
Want a quick and expert briefing on the biggest news stories? Listen to our latest podcasts to find out What You Need To Know...