Scottish nationalists picked Humza Yousaf to be the country’s next leader on Monday after a bitterly fought contest that exposed deep divisions in his party over policy and a stalled independence campaign. The 37-year-old practising Muslim will succeed Nicola Sturgeon as leader of the governing Scottish National Party (SNP) and, subject to a vote in the Scottish parliament, take over as head of the semi-autonomous government. Setting out his goals, Yousaf said he would concentrate on tackling the cost of living crisis and make a renewed push for independence. “The people of Scotland need independence now more than ever before, and we will be the generation that delivers it,” he said in Edinburgh after the result. Yousaf’s victory was confirmed at the capital’s Murrayfield rugby ground after a six-week campaign where the three candidates spent much of the contest criticising each other’s record in a series of personal attacks. The SNP’s unity, which had been one of its strengths, broke down over arguments about how to achieve a second independence referendum and the best way to introduce social reforms such as transgender rights. Yousaf takes over a party with an overriding objective to end Scotland’s three-centuries-long union with England. But while about four in 10 Scots still support independence, according to a poll this month, the departure of Sturgeon – a charismatic and commanding leader – may slow some of the momentum behind a breakup of the United Kingdom. There is no agreed strategy for how to force a new referendum – one of the reasons Sturgeon resigned. The often bad-tempered leadership contest has relieved some pressure on British Prime Minister Rishi Sunak, who is dealing with divisions in his own party, waves of industrial action and high levels of inflation. Yousaf won 24,336 of the votes of the SNP’s members in the first round, while his main rival Kate Forbes 32, Scotland’s finance minister, came second with 20,559 votes. Ash Regan, who quit the government because of her opposition to proposed changes to gender recognition, was third with 5,599 votes. The frontrunner to replace Sturgeon, Yousaf has stressed continuity with her record, including her push to make it easier for transgender people to gain official recognition to change their gender. Yousaf has spoken of the need to focus on building the case for independence and achieving consistent support for the movement, adding that he was open minded on which process to pursue once that level of support was achieved. Yousaf pointed to his own background – born in Glasgow, with a father from Pakistan and mother from Kenya – and views as examples of the inclusive, socially liberal and multi-ethnic Scotland that the SNP has promoted. During the campaign, Yousaf appeared more relaxed than Forbes, a member of the Free Church of Scotland, in balancing his religious views with the party’s socially progressive policies. While Forbes faced criticism when she announced her opposition to same-sex marriage, Yousaf said he supports it. In 2016, Yousaf took his oath of allegiance in the Scottish parliament in Urdu while wearing a kilt. Yousaf also said during the campaign an independent Scotland should look at ditching the British monarchy. Scotland voted against independence by 55% to 45% in 2014. Britain’s vote to leave the EU two years later when a majority of Scots wanted to stay, and Scotland’s handling of the coronavirus pandemic, brought new support for independence. However, an opinion poll this month showed the backing for independence dropped to 39%, or 46% when ‘don’t knows’ are excluded. That compares with a record 58% in 2020. Michael Russell, the president of the SNP, said a week ago the party was in a “tremendous mess”. The Scottish government’s first and only Muslim cabinet minister, Yousaf will be sworn in as Scotland’s leader on Wednesday if he wins a vote in the country’s parliament the day before.