The Prime Minister has said he is "delighted" by Boris Johnson's mayoral victory and pledged the pair will work together "for the good of London".
David Cameron praised Mr Johnson for running a "very strong" campaign and said he had enjoyed backing his bid for re-election.
He said: "I am delighted with the result. I think it was a very strong campaign. It was based on his record, on the excellent things he has done as Mayor.
"It was a campaign the whole Conservative Party got behind. I enjoyed campaigning with Boris. But now what matters is working together for the good of London as Prime Minister, as Mayor, and that's exactly what we're going to do."
Mr Johnson's victory over Labour's Ken Livingstone comes as somewhat as a consolation prize for the Conservatives after a grim day for both coalition Government parties at the polls.
The Tory polled 1,054,811 to Mr Livingstone's 992,273 following a bitter campaign battle that saw the two men clash furiously in public and in private.
He is now being touted as a future Tory leadership contender.
Speaking alongside Mr Cameron at City Hall, Mr Johnson said of his victory: "I think people were listening to what we had to say about cutting taxes, getting rid of all sorts of unnecessary expenditure, putting it where people want to see it.
"It was a very hard-fought, long campaign. I am grateful to the Conservative Party. They did turn out in large numbers to help me, but I think we were able to reach people across the city with a message that resonated with them in tough times.
"We have got to get the city through tough times - and that is about creating jobs, going for growth, and I hope very much to continue working with the Government to get the funding, get the investment that London needs."
To enthusiastic applause from party members Mr Johnson signed the declaration of office.
He vowed to "work his socks off" as he thanked voters for giving him a "second mandate".
However, Mr Livingstone dismissed Mr Johnson as a "do nothing mayor".
"The problem with this Tory mayor is that he didn't do the job in the last four years.
"If we have another four years like that then by the end of this decade London will be insufferable.
"If you have eight years of a do nothing mayor, firms will be saying 'London isn't working' - they will be thinking of moving elsewhere.
"So it will be the mayor - two down the road from here - who then faces a real crisis."
Mr Johnson outperformed his party, which suffered a significant drubbing in local elections nationally.
But no mayoral candidate won enough votes in the first round to secure victory, meaning second preferences had to be counted.
Mr Livingstone's defeat by the wafer-thin margin of 48.5%-51.5% to Mr Johnson prompted an immediate announcement of his decision not to stand again.
"This is my last election," Mr Livingstone told fellow candidates and supporters.
"Forty-one years ago almost to the day, I won my first election on a manifesto promising to build good council housing and introduce a free bus pass for pensioners.
"Now I've lived long enough to get one myself... since then, I've won 11 more elections and lost three. But the one I most regret losing is this.
"This is the defeat I most regret, because these are the worst times for 80 years, and Londoners needed a mayor to get them through this very difficult period by cutting fares, by cutting energy prices and putting people back to work building good council homes."
Labour secured eight of the London Assembly's 14 first-past-the-post constituencies, gaining two from the Tories, which left them with six.
Liberal Democrat Brian Paddick was pushed into a humiliating fourth place after polling 91,774 votes, compared to the 98,913 secured by the Green Party's Jenny Jones.
Political newcomer, Independent Siobhan Benita, took fifth with 83,914. Ukip's Lawrence James Webb polled 43,274 while the British National Party's Carlos Cortiglia came last with 28,751.
Counting, which is carried out electronically, was dogged by delays, pushing back the result back significantly on original predictions that it would be announced in the early evening on Friday.
They included a power cut at Alexandra Palace as well as the reprocessing of two mislaid batches of ballot papers in the Brent and Harrow constituency.
Mr Johnson's victory goes some way in restoring pride to the election-battered Tories, after the party lost more than 400 seats in the local elections .
In further bad results for the coalition, the Lib Dems lost more than 380 seats following voting in England, Wales and Scotland.
As well as the London battle, a series of cities across the country held referendums on whether to have elected mayors.
Nottingham and Manchester were among the nine cities to reject the idea - another major blow for Tory Prime Minister David Cameron , who supports the policy.