Scottish Labour's Kezia Dugdale has been elected leader of the party after just four years as an MSP.

Ms Dugdale beat Holyrood veteran Ken Macintosh in a leadership election sparked by the resignation of former MP Jim Murphy shortly after Labour's near wipeout in Scotland in the general election.

The result of the ballot was announced in Stirling, following an election campaign in which Ms Dugdale pledged to be a "fresh start" for Scottish Labour.

Ms Dugdale, the favourite to win the contest, won 72.1% of the vote, while Mr Macintosh was backed by 27.9%.

The new deputy leader was also announced, with Alex Rowley beating fellow MSP Richard Baker and Glasgow City Council leader Gordon Matheson.

Around 21,000 party members and supporters were eligible to vote in the contest, which was held on a one-person one-vote basis following reforms introduced by Mr Murphy.

Speaking after the result was announced, Ms Dugdale said: "I know that the past few months have been incredibly difficult for Labour members across the country.

"I know this because I have been out on the doorsteps, I have been there with you.

"But I have a message for Labour Party members out there knocking their pan in for this party that we all love: we are down but we are not out."

She added: "I will work night and day over the coming weeks and months to make you proud, to honour that trust that you have put in me today, to give you some hope, to renew your faith in our abilities to transform the communities that we seek to serve.

"And I have a message for the people of Scotland too: take another look at the Scottish Labour Party."

"I am not so presumptuous as to ask instantly for your vote, but in the recent election 700,000 of you stuck with us, but many of you chose someone else," Ms Dugdale said.

"All I ask is that you take a fresh look at the Scottish Labour Party under my leadership.

"We are changing. I am part of the new generation, someone without the baggage of the past.

"I have a proud, positive vision for our country.

"Scotland is a great nation, full of proud, talented and hardworking people and I want to make it even better.

"I want to transform this country, to shake it up profoundly, so that the life chances of a child born today aren't determined by how much their parents earn, but by their potential, by their work ethic, and by their ambition.

"A Scotland where power and wealth are in the hands of the many and not the few."

Ms Dugdale said the party's defeat in May, where it retained just one seat in Scotland at Westminster, was "a long time coming".

She said there were, in her view, two reasons "that led so many people to lose faith in us".

"Firstly, a large part of the population have simply switched off from us," she said.

"It's not so much that they don't like what they hear, they have stopped listening to us altogether.

"Secondly, those who are willing to give us a hearing say that they don't know what we stand for any more.

"I can tell you that under my leadership there will be no question over what we stand for, or who we stand with.

"If you want better for your kids but feel they are being let down, I am on your side.

"If you fancy the challenge of setting up your own business but feel government doesn't offer enough support, I am on your side.

"And if you are a couple desperate to get on the housing ladder but face too many hurdles, I am on your side.

"If you love this country but want to make it better, then we can work together."

Speaking after being elected as Ms Dugdale's deputy, Mr Rowley said Labour must return to its core values.

"Full employment must be the number one priority of Labour in Scotland as we move forward to tackle inequality and poverty," he said.

He said new powers coming to the Scottish Parliament should be used to help achieve this.

"And yes, if we need more powers, then the Labour Party in Scotland should be in a position to take those powers to tackle poverty, tackle inequality, create fairness and create a better and more just Scotland," he added.

Harriet Harman, interim leader of the Labour Party, congratulated Ms Dugdale and Mr Rowley.

"They will be leading the historic task of rebuilding our Party in Scotland, reconnecting Labour with the people of Scotland and re-energising the links between our party in Scotland, Wales and England," she said.

"And I know they will lead the party in Scotland forward with energy and commitment to Labour values and principles and will have the full support of the whole of the Labour Party."

UK Labour leadership candidate Jeremy Corbyn MP also congratulated the pair.

Ms Dugdale was accused this week of backtracking on her view of Mr Corbyn's own leadership bid, stating that their politics were not "wildly different" and claiming she was "excited" by his campaign.

She had previously stated that if he is successful then Labour would be left "carping on the sidelines".

"Both Kezia and Alex clearly recognise that there's a long road back for the party in Scotland, but I think they're well equipped for the task in hand," Mr Corbyn said.

The favourite to win the UK contest added: "If I am successful in becoming the leader of the Labour Party at a UK level, I look forward to working closely with Kezia, and the rest of Scottish Labour, as we seek to reconnect everywhere for a better kind of politics."

SNP business convener Derek Mackay said: "I congratulate Kezia Dugdale and Alex Rowley on their success and look forward to working together wherever we can for the benefit of everyone in Scotland.

"However, a change of leader alone will not solve the deep, deep problems which the Labour Party in Scotland now faces."

Ms Dugdale is the sixth person to lead the party in the last eight years, Mr Mackay said.

He said the SNP had offered to "work constructively" with each leader, and called on Ms Dugdale to accept such a offer.

"Kezia Dugdale's election as leader is a chance for Labour to show it has learned - but it is up to her to prove she is capable of making a break from the endless negativity and obsessively anti-SNP agenda and instead work together for the good of everyone in Scotland," he said.