Matthew Lloyd via Getty Images
BRIGHTON, ENGLAND - MARCH 10: Tim Farron, President of the Liberal Democrats makes a speech at the Liberal Democrats Spring Conference on March 10, 2013 in Brighton, England. Deputy Prime Minister Nick Clegg delivered his keynote speech bringing the three day conference to a close. (Photo by Matthew Lloyd/Getty Images)

Tim Farron has been elected as the new leader of the Liberal Democrats, beating rival Norman Lamb.

The Westmorland and Lonsdale MP now faces the hard task of trying to rebuild a party that was all but wiped out at the general election.

He succeeds Nick Clegg, who stepped down as leader after the Lib Dems lost all but eight of their 56 MPs.

THANK YOU! This is a liberal country. Our job now is to turn millions of liberals throughout the UK into Liberal Democrats #LibDemFightback

— Tim Farron (@timfarron) July 16, 2015

The party announced the leadership result on Twitter and Facebook. Farron received 56.5% of the votes and in second place Norman Lamb received the backing of 43.5%. The party said nearly 34,000 members voted in the leadership election.

We are delighted to announce that @timfarron has been elected as Leader of the Lib Dems. http://t.co/f6SCO9cZUYpic.twitter.com/Khd7KH64aF

— Liberal Democrats (@LibDems) July 16, 2015

Farron, who served as party president during the coalition years, is seen to be on the left of the party. While Lamb, who was a health minister in the last government, was seen as closer to Clegg.

Lamb said: "This leadership election has energised and united our party. Tim Farron will be a passionate leader of our party, championing social justice and leading from the front in our campaign to rebuild the liberal voice in our country. I will give him my full backing."

Congratulations to new @libdems leader @timfarron. It's a tough job but the best in politics. I know Tim will do us proud #libdemfightback

— Nick Clegg (@nick_clegg) July 16, 2015

In a statement Clegg said: "Tim Farron is a remarkable campaigner and a man of the utmost integrity and conviction.

"He is a natural communicator with a rare ability to inspire people and rally them to our cause. He knows how to win and I have no doubt he can pick the party up and get us fighting again.

"It has been a pleasure to serve alongside Tim in Parliament and a privilege to consider him a friend. I know he will be a brilliant leader and he will always have my support.”

Commenting on the election, Lib Dem party president Sal Brinton said: "Both Tim and Norman ran distinctively liberal, strong campaigns that spoke to party members across the UK. At numerous hustings and meetings with members, they spoke of their liberal values, the direction they think we should go, and how to best rebuild the party over the coming months and years.

"Tim is a fantastic communicator and his energy, enthusiasm and passion will inspire and drive the Liberal Democrats back to winning ways."
[{"document_url": "https://www.huffingtonpost.co.uk/2015/07/16/tim-farron-wins-lib-dem-leadership_n_7809798.html", "unformatted_src": "https://s-i.huffpost.com/gen/3196272/images/n-TIM-FARRON-628x314.jpg", "src": "https://s-i.huffpost.com/gen/3196272/images/n-TIM-FARRON-628x314.jpg", "formatted_filename": "n TIM FARRON", "alt_text": "BRIGHTON, ENGLAND - MARCH 10: Tim Farron, President of the Liberal Democrats makes a speech at the Liberal Democrats Spring Conference on March 10, 2013 in Brighton, England. Deputy Prime Minister Nick Clegg delivered his keynote speech bringing the three day conference to a close. (Photo by Matthew Lloyd/Getty Images)"}, null, {"document_url": "https://www.huffingtonpost.co.uk/2015/07/16/tim-farron-wins-lib-dem-leadership_n_7809798.html", "unformatted_src": "https://amp.assets.huffpost.com/assets-c96fe04d497c777a008a54ac0ca7fa6c/images/snapchat/huffpost-uk.png", "src": "https://amp.assets.huffpost.com/assets-c96fe04d497c777a008a54ac0ca7fa6c/images/snapchat/huffpost-uk.png", "formatted_filename": "huffpost uk"}, null]