Jeremy Corbyn has secured victory in the Labour leadership contest, winning with 62% of the vote.

He beat Pontypridd MP Owen Smith, who had the backing of most of the party's MPs.

The result was announced as the party gathered for its annual conference in Liverpool, which begins formally on Sunday.

The incumbent leader won 313,209 votes compared to Mr Smith's 193,229, 38% of the vote.

In his victory speech after the results were announced, Mr Corbyn called for unity in the party.

He said: "In our party we have much more in common than that which divides us.

"Let's wipe the slate clean and get on with the work of the party which we've got to do together."

Referring to the "passionate and often partisan" contest, Mr Corbyn acknowledged "things are sometimes said in the heat of the debate on all sides which we sometimes later come to regret."

But he added: "I will do everything I can to repay the trust and support, to bring our party together, to make it an engine of progress for our country and the people that depend on the Labour Party to protect their interests, and win power to deliver real change in this country."

Speaking after the result, Mr Smith urged his supporters not to break away from Labour: "I fully accept and respect the result and I will reflect carefully on it and on what role I might play in future to help Labour win again for the British people.

"I have no time for talk of a split in the Labour movement - it's Labour or nothing for me. And although today's result shows that our movement remains divided, it now falls primarily to Jeremy Corbyn, as Labour leader, to heal those divisions and to unite our movement."

Scottish Labour leader Kezia Dugdale said: "Jeremy can unite the Labour Party, but he needs to want to unite it. That means he needs to work with both the party across the country and MPs to provide an effective opposition to the Tories in Westminster.

"It will be a difficult task for Jeremy, but not an impossible one. Likewise, the Parliamentary Labour Party (PLP) must recognise that a divided Labour Party serves no-one."

Mr Corbyn was challenged following mass resignations from his shadow cabinet in the wake of the Brexit vote three months ago.

Critics hit out at his leadership of the party, with many saying he was leading Labour to defeat at the next general election.

The Islington North MP said he had a responsibility to continue in his role and called for the party to "come together".

He won the backing of the party's membership and affiliated supporters despite a wide range of senior Labour figures supporting Mr Smith's campaign.

Mr Corbyn was initially considered an outsider when he announced his candidacy for the Labour leadership in 2015, after Ed Miliband stood down.

His radical left-wing message saw thousands of new supporters flock to the party to back him and he won almost 60% of the vote against Andy Burnham, Yvette Cooper and Liz Kendall.

Labour have trailed the Conservatives in UK-wide opinion polls during Corbyn's leadership.

He also faced criticism of his role in the EU referendum, with accusations his backing for the Remain campaign was half-hearted.

The aftermath of the Brexit vote led the PLP to hold a no-confidence vote in Corbyn.

Owen Smith was the only challenger after Angela Eagle, a former member of the shadow Cabinet, dropped out of the race.

Smith argued his policies were similar to the veteran left-winger's but he had the leadership qualities necessary for the job.

This appears to have failed to win over Mr Corbyn's supporters, with opinion polling of Labour's members and supporters showing the incumbent leader comfortably ahead during the contest.

Those who support Mr Corbyn have argued he is being undermined by a section of the party which has failed to accept his victory in 2015.

More new members signed up to the party after the Brexit vote, with the number of members and supporters now exceeding 650,000.