THE most remarkable aspect of Scottish Labour’s interminable leadership contest is that Anas Sarwar managed to get 43 per cent of the vote.

By any yardstick, the millionaire Glasgow MSP was a woeful candidate and a highly implausible potential First Minister.

Labour is the party of state education, but Sarwar uses a private school system that entrenches inequality.

Labour is supposed to be the vehicle for delivering decent wages for staff, but Sarwar’s family firm, in which he had a near £4 million stake, pays some staff below the real living wage.

And although trade unions helped form the Labour party, United Wholesale (Scotland) has no recognition agreement with any union.

Labour members sniffed insincerity and voted for left-winger Richard Leonard.

However, there are two reasons why Leonard did not win with a bigger margin.

One, by dint of his wealth, Sarwar put together a decent team of political operatives who knew how to run a professional campaign. Other than Corbyinsta Simon Fletcher, Leonard’s campaign gave the impression at times of being shambolic and reactive.

The “manifesto” Leonard’s team cobbled together ahead of the ballot opening had all the elan and class of a student dissertation.

By contrast, Sarwar’s backers worked the media and successfully spun a range of questionable assertions that were inexplicably taken seriously.

His network of supporters parroted the line that the stories on the Sarwar family firm had come from the Leonard campaign and were an unfair attack on their man’s character. In reality, the sources for nearly all the damaging articles on Sarwar were Google and Companies House. The Leonard campaign simply did not have the capacity, or ability, to dig up information on Sarwar.

Two, Sarwar’s side was far more effective at signing up new “members” than Leonard was in recruiting trade union supporters.

His backers added around 4,000 people to the contest – some of whom, curiously, had the same mobile number and email address – while the unions only signed up a fraction of that amount.

If the contest had been restricted to the existing members and affiliated supporters Leonard would have humiliated Sarwar. Instead, he had to make do with an easy win.

The left-winger has a clear mandate, but he also has tricky decisions to make. He has to appoint a Shadow Cabinet, but a majority of his MSPs voted for Sarwar. He also needs to learn from the mistakes made by Jeremy Corbyn when appointing a credible team of staff.

Sarwar, meanwhile, should think long and hard about the identity of the person who caused his defeat. He should buy a mirror.