Boris Johnson has been re-elected as London mayor, defeating Labour's Ken Livingstone - a consolation prize for Conservatives after a grim day for both Government coalition 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.
Mr Johnson vowed to continue "fighting for a good deal for Londoners" from government as he thanked voters for giving him a "new chance".
The mayor 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 at City Hall.
"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."
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 Greens' 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 Mr Cameron, who supports the policy.