Boris Johnson wins London mayoral race
The Conservative candidate won with 1,168,738 first and second preference votes, compared with Mr Livingstone's 1,028,966.
Mr Johnson thanked his family, party activists for their help in a "marathon election".
He is expected to stand down as MP for Henley, triggering a by-election.
He paid tribute to Mr Livingstone for shaping the office of mayor and speaking for London after the 7 July bombings in London, saying he had the "thanks and admiration of millions of Londoners".
Mr Johnson's victory crowns the party's May Day local election wins in England and Wales. He said he hoped it showed the Conservatives had changed "into a party that can be trusted".
Mr Livingstone's defeat ends what Gordon Brown has called as a "bad" day for Labour in which it suffered its worst council results for 40 years.