Boris Johnson expressed his "sadness" and "relief" that the London Olympics was over as he claimed it had been "the greatest Games ever".
The Mayor of London said he had felt a "momentary mad desire" to refuse to hand back the Olympic flag during Sunday night's closing ceremony.
"If you were to say to me that we have just held the greatest Games ever in Britain, I would say you are on the right track," he told a London press conference.
Asked whether he shared the melancholy of others at the end of the Games, he said: "It's certainly true I did feel a momentary mad desire last night not to give Jacques Rogge that flag. I almost yanked it back.
"But I suppose there are two emotions - one is obviously some sadness that it is all over, because it's been an amazing experience, but also a great relief because there is no doubt it has been a prodigious exertion by London and by Londoners."
Paying tribute to Lord Coe, chairman of the organising committee Locog, the Mayor said London had staged "the most extraordinary event we can remember in our lifetimes and which we will remember for the rest of our lives".
Culture Secretary Jeremy Hunt said: "This has been two weeks when Britain didn't just surprise the world but surprised itself."
Mr Johnson said London was committed to ensuring a sporting legacy from the Olympics - and to providing thousands of jobs and homes.
Some 3,500 people have come forward to get involved with sport since the Games began, he said. "There are a series of exciting global sporting competitions (coming to London) and it is in that context we want to be expanding very vigorously now the number of young people who take part, we want people of all ages to take part in sport."
Mr Johnson also urged sports fans to snap up tickets for the forthcoming Paralympic Games, for which there was "massive demand" in the wake of the events of the past fortnight.