It ended as it had begun, with the stars and stripes raised to mark American gold but there was one significant difference to last night's finale in the Aquatics Centre; at its heart was Michael Phelps.
On opening night, Phelps had been conspicuous by his absence from the list of medal winners. He came fourth in the 400m individual medley, an also-ran in the wake of Ryan Lochte, the man who would be Phelps. It was a false start and last night the most decorated athlete in Olympic history was back where he belongs stepping, smiling broadly, on to the top of the podium for the 18th and final time.
The final gold, to add to a quartet of silver and bronze, came in the 100m medley relay and included a key contribution from Phelps, who is a swimmer unrecognisable from that sluggish start to the week. It was his butterfly leg, the penultimate, that restored his team's lead, one that freestyler Nathan Adrian would dare not squander.
"I can sum it up in a couple of words," said Phelps. "I did it."
It had been an emotional evening, his last in a competitive pool at the age of 27. There were tears in the warm-up pool with Bob Bowman, his coach. It is a partnership that has gathered 26 world titles, the first 11 years ago, and broken 35 world records. It is a string of numbers that add up to make the greatest Olympian. "I love him to death," said Phelps of his coach. "Bob and I have somehow managed to achieve everything that we set out to do and when you can say that it is time for something else."
There was much that was familiar about the last night. American gold, another world record with Missy Franklin at its heat – that's four gold medals for the 17-year-old. She does not like the female Phelps comparisons – "They are too big feet to fill," she said – but they are apposite. It is now left to Keri-Anne Payne to salvage the Games for Britain's swimmers. Fran Halsall, ranked second quickest in the world, represented the last chance in the pool for a team that had arrived in London in buoyant mood but faded over the closing stages of the 50m to finish fifth.
Gold went to Ranomi Kromowidjojo, as the flying Dutchwoman completed a notable sprint double and set a new Olympic record in the process. Halsall was a painful 800ths of a second short of medal. In the British trials here in March she registered a time of 24.13sec, a time still only Kromowidjojo has bettered this year. Last night she finished in 24.47sec – her trial time would have been good enough for silver.
Daniel Fogg finished last in the 1500m final, the women's 4x100medley relay team were also eighth but the men's 4x200m relay did claim fourth. Britain's swimmers were set a target of five to seven medals in London and were confident of achieving it. "The hay is in the barn," said Dennis Pursley, the team's American head coach, on the eve of the Games. It was not a good harvest, limited to Michael Jamieson's dramatic and unexpected silver and Rebecca Adlington's two bronze medals. Payne, the world champion, swims on Thursday in the open-water event in the Serpentine and is favourite to win gold.
"We have had more finalists here than ever before at an Olympics," said Micheal Scott, the team's performance director. "But at the end of the day we are judged on medals. We have three medals in the pool – which matches Beijing but it is below what we expected."
While Britain are a swimming nation treading water, China are a rising power in the pool. Sun Yang last night shattered his own world record in the 1500m to claim his second gold of the week. It was China's fifth gold in all making it comfortably their best ever Games. Only the US have won more, although come Rio in four years time they will have to do it without the man who has delivered the most.