Media playback is unsupported on your device Media caption Kezia Dugdale is the new leader of Scottish Labour

Kezia Dugdale has been elected as the new leader of Scottish Labour, telling supporters: "We are down, but we are not out."

The MSP got the job following the resignation of Jim Murphy in June, after Labour lost all but one of its 41 Scottish seats at the general election.

Ms Dugdale vowed to work "night and day" to reverse the party's fortunes.

Labour MSP Alex Rowley, a former aide to Gordon Brown, was elected as the party's new deputy leader.

Ms Dugdale saw off a challenge from Ken Macintosh for the leadership, winning the contest with 72% of the vote.

About 15,000 party members and 6,000 affiliated and registered members were entitled to take part in the ballot, which was held under a new one-person-one-vote system. Labour did not reveal the numbers who actually voted.

Ms Dudgale, who previously served as deputy leader under Mr Murphy, faces her first big test in the Scottish Parliament election next May, where a surging SNP is seeking a third term in office.

Appealing to voters while speaking in Stirling, the Lothian MSP said: "Take another look at the Scottish Labour party.

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

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

Image copyright PA

Analysis by Andrew Black, BBC Scotland political reporter

Scottish Labour has elected its eighth leader in 15 years.

But Kezia Dugdale's victory celebration will be short-lived. Her party is now in a fight for its very existence.

Ms Dugdale's first big challenge will be the Scottish Parliament election - less than nine months away. But right now, it's simply not possible to see how the party can win it.

Labour is one of those parties which hasn't in the past always taken kindly to losers in its senior ranks (Ms Dugdale's predecessor Jim Murphy lasted six months).

But party chiefs have made clear Scottish Labour must now be in it for the long haul.

That essentially means a move away from calls for yet another leader if next May's Holyrood poll produces a repeat of the recent UK election result, in which Labour lost all but one of its 41 Scottish seats.

Ms Dugdale's plan to rebuild the party centres on her - at the age of 33 and with just four years as an MSP - leading the charge of a new generation of Labour activists, while moving away from Scottish Labour giants of the past, such as Gordon Brown, Alistair Darling and the like.

At the same time she needs to fix the problem which has dogged Scottish Labour for the past eight years - namely that voters stopped listening to the party because they didn't know what it stood for anymore.

Basically, Kezia Dugdale has just taken on one of the toughest jobs in politics.

Ms Dugdale added: "We are changing. I am part of a new generation. Someone without the baggage of the past."

The new Scottish Labour leader also told gathered members of the party faithful: "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."

She added: "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."

Image copyright Getty Images Image caption New Scottish Labour leader Kezia Dugdale and deputy leader Alex Rowley after the announcement at the Stirling Court Hotel

Kezia Dugdale Alex Rowley Age: 33 Age: 51 Education: University of Aberdeen and University of Edinburgh. Education: University of Edinburgh. Politics: Elected to Holyrood as a Lothian list MSP in 2011. In 2014 she was elected deputy leader of the Scottish Labour Party. Politics: Elected MSP for Cowdenbeath in January 2014 by-election. Former leader of Fife Council and one-time aide to Gordon Brown. Before politics: From 2007 to 2011 she worked as office manager and political adviser to Labour list MSP George Foulkes. Before politics: Worked as a council gardener.

Mr Rowley, who stood for deputy leader against Glasgow City Council leader Gordon Matheson and MSP Richard Baker, took the job on the second round of voting.

The Fife MSP, who won a by-election to take the Cowdenbeath seat in January last year, said: "I grew up in the mining village of Kelty. As I grew up it was quite clear that the Labour party was the party of working people."

He added: "Labour must unite across Scotland to tackle inequality, poverty and create employment."The SNP's Derek Mackay congratulated Ms Dugdale and Mr Rowley on their success, but said a change of leadership alone would not solve "the deep, deep problems which the Labour Party in Scotland now faces".

Scottish Conservative leader Ruth Davidson said that while Labour was reforming itself, her party would be the "principled opposition, holding the SNP government to account and giving a voice in Holyrood to the two million Scots who voted 'No' in the referendum".

Patrick Harvie, of the Scottish Greens, added: "There doesn't seem to be much chance of Kezia's party being able to connect with voters in time for the Holyrood election in May."

The results

Leader:

Kezia Dugdale: 72.1% of the total vote

Ken Macintosh: 27.9% of the total vote

Deputy leader

Round one

Alex Rowley: 37.4% of the total vote

Gordon Matheson: 32.2% of the total vote

Richard Baker: 30.4% of the total vote

(Richard Baker eliminated after receiving the least votes)

Round two after transferral of votes

Alex Rowley: 55.5% of the total vote

Gordon Matheson: 44.5% of the total vote