Hamza Yousaf was sworn in as Scotland’s new prime minister today in a ceremony that mixed local tradition with his Pakistani heritage, then announced the first cabinet, the composition of which could deepen the rift within the SNP, the Scottish National Party.

Yusuf, the first Muslim leader of a Western European nation, wore a black Pakistani salwar during his swearing-in at Scotland’s highest court. His wife, who was watching with their children and his parents, broke down in tears at the start of the ceremony.

The 37-year-old new prime minister has pledged allegiance to King Charles, although he has previously said he would like to see the monarchy abolished and the king replaced by an elected head of state if he achieves his goal of Scottish independence.

He then announced a new cabinet of six women and three men – all of whom were close associates of Nicola Sturgeon, the prime minister who stepped down last month after dominating Scottish politics for a decade. However, Yusuf’s rivals in the party leadership claim and their allies were excluded from the local government, who argued that the positions offered to them amounted to demotion. Kate Forbes, his main rival in the internal party process and previously finance minister, has turned down an offer to take over as rural affairs and islands minister, according to a source familiar with the talks. Former health secretary Alex Neil, who supported her, said the proposal was “an insult and not a real attempt to reunify” the party. Business Minister Ivan Mackie, who also backed Forbes, said he was leaving the government after being offered a job he saw as a demotion.

Shona Robison, a close friend of Sturgeon, takes over as finance minister and first deputy prime minister. Angus Robertson remains in his post as head of constitutional affairs and foreign affairs.

It is the first time that women are the majority in the local government.

One of the challenges Yousaf will face is the reunification of the party. It will also have to chart a new course on the road to independence from the UK and also solve problems in the health and education systems.