Anas Sarwar has been announced as the new Scottish Labour leader.
Glasgow MSP Mr Sarwar defeated Monica Lennon, the only other candidate in the race.
The contest was triggered after Richard Leonard resigned as leader, saying it was in the best interests of the party for him to stand down.
Mr Sarwar takes charge of the party ahead of the Scottish Parliament election, which is scheduled to be held on 6 May.
Mr Sarwar, who is the first non-white leader of a major political party in the UK, got 57.6% of the vote, while Ms Lennon got 42.4%.
In his acceptance speech, he said: "I want to say directly to the people of Scotland, I know Labour has a lot of work to do to win back your trust.
"Because if we're brutally honest, you haven't had the Scottish Labour Party you deserve.
"With rising injustice, inequality and division, I'm sorry we haven't been good enough.
"And I will work day and night to change that, so we can build the country we all need."
The election of Anas Sarwar is obviously important for Scottish Labour but it is a landmark in UK politics too.
Never before has any major political party chosen a leader from a non-white minority ethnic group.
That could afford Mr Sarwar a voice, an influence and a status as a role model well beyond Scotland.
However, his primary job is to rebuild Labour in Scotland from their current position in a miserable third place, with Holyrood elections less than 10 weeks away.
While his opposition to indyref2 for the whole of the next parliament offers clarity and reassurance to pro-UK voters, it may cause frustration among Labour-minded voters who support independence.
That he is his party's 10th leader since devolution, the seventh since the SNP took over from Labour in the Scottish government in 2007 gives a clue to the severity of his challenge.
Former leader Mr Leonard congratulated Mr Sarwar, calling for the party to get behind him.
Ms Lennon also took to Twitter to congratulate the new leader, as well as thank her campaign staff and issue a call for party unity.
She said: "Congratulations to Anas Sarwar, our new leader. Proud to have been part of this positive leadership debate."
Lothians Labour MSP Neil Findlay told BBC Scotland that the prospect of another independence referendum remained the "elephant in the room" for his party.
He said: "We cannot rebuild the labour party taking a hard unionist stance, I don't think that is credible because that immediately writes off the 50% or so of the electorate who want a referendum.
"We need a clear, radical alternative based on maximum devolution and I would argue that should be the third option on any ballot paper in any future referendum."
First Muslim leader
On becoming the first non-white leader of a major political party in the UK, Mr Sarwar said: "That doesn't say something about me. That says something great about Scotland and its people."
The move was welcomed by Scotland's justice secretary and SNP MSP Humza Yousaf.
Will do politics another day, but today can I congratulate @AnasSarwar on becoming @scottishlabour leader - think this makes him first Muslim & Person of Colour leading a political party in UK, an incredible & historic achievement of which I am proud of him for. Well done Anas 👏— Humza Yousaf (@HumzaYousaf) February 27, 2021
The Scottish Labour leadership race was short, and largely overshadowed by the Covid crisis, but was more cordial than previous contests the party has held.
Scotland's constitutional future was one of the major features of the campaign, with both candidates repeatedly asked for their take on the issue.
While both have said they are opposed to the idea of Scottish independence, Ms Lennon said that should a pro-independence majority be elected to Holyrood in May, the party would have to accept another referendum on the issue.
Mr Sarwar, meanwhile, has urged independence-supporting parties to put the issue aside and focus on the recovery from coronavirus.
Reaction from rivals
First Minister Nicola Sturgeon congratulated Mr Sarwar and tweeted, "he (and his dad before him) and I are long-time political opponents, but I also like and rate him. That may not always be obvious in the weeks ahead as election battle is joined, so worth saying so now."
Douglas Ross, leader of the Scottish Conservatives, also congratulated Mr Sarwar in a tweet and added: "Yesterday I said @ScotTories will not support indyref2 or work with the SNP at any stage. I hope he will now do the same."
Scottish Greens co-leader Patrick Harvie said Mr Sarwar faced a "divided party" on the issue of Scottish independence.
Scottish Liberal Democrat leader Willie Rennie said the new leader should concentrate on advancing UK federalism.
He said: "I am keen to work with Anas and his party to make reform of the UK a reality. "
Reacting to the announcement, trade unions have appealed for Labour party unity ahead of May's Holyrood elections.