Failing to do so could result in the medics being forced to repay their tuition fees and bursary support.

But Mr Sarwar, who graduated as a dentist 21 years ago and worked for the NHS in Paisley until he was elected as the MP for Glasgow Central at the 2010 general election, failed to complete five years, as first reported by the Scottish Daily Mail.

He replaced his father Mohammad Sarwar in the House of Commons until he lost the seat to the SNP in 2015.

The Scottish Labour leader, who is vying to become the next first minister in Holyrood, said it was “not embarrassing” that he would have been liable to repay tuition fees if his own policy was in place in 2010.

Speaking on BBC Scotland’s Sunday Show, Mr Sarwar said: “It’s not embarrassing at all because the premise of that question is to say that we never change the law on anything. If you have to change the circumstances that you face today, I maintained my role in public service. I’ve been a public servant for 20 years.

Read more:

“I would have happily have done more hours work on the NHS if the expectation wasn’t on me to be a full time Member of Parliament.”

He added: “What we’ve got to do is fix the mess right now. You’re asking me about 21 years ago.

“I’m saying right now we have a situation where the taxpayer rightly funds free tuition for people across the country. I support free tuition. We will maintain free tuition. But it’s also right that if someone uses their taxes to train you to work in our health professions, then they should have the benefits of your skills too so we’re saying that if we fund your education and you train here, you should stay here and work in our NHS and social care system for at least five years.

“That’s fairness for the taxpayer, fairness for the individual and fairness to deliver that future NHS.”

But Dr Sandesh Gulhane, the Scottish Tory health spokesman, described it as a “staggering hypocrisy”.

He said: “Anas Sarwar’s Sunday show appearance exposed staggering hypocrisy — proposing a five-year NHS service rule for newly trained doctors and dentists that he himself would not have met.

“If he believes graduates should repay taxpayers when they don’t fulfil that obligation, Scots will rightly ask whether he will now pay back the equivalent cost himself.

“Having recently called for Keir Starmer to step down, it’s clear Labour are distracted by internal divisions instead of focusing on fixing Scotland’s economy, improving our schools and repairing struggling public services after years of SNP failure.

Read more:

“Scotland needs serious leadership and honest solutions — and the Scottish Conservatives will continue to hold both Labour and the SNP to account while delivering practical policies that put patients, pupils and taxpayers first.”

SNP MSP Clare Haughey said the Scottish Labour leader had been left “red faced”.

She said: “This is pure hypocrisy from Anas Sarwar and shows just how poor his judgement is.

“Given the people of Scotland’s mood towards the Labour Party, he may soon have the opportunity to return to dentistry and complete his five years anyway.

“Time after time Anas Sarwar’s poor judgement has left him red faced. With the SNP, John Swinney’s strong leadership is on Scotland’s side, focussed on Scotland’s priorities.

Mr Sarwar unveiled the policy at Scottish Labour conference – an event largely overshadowed by Labour’s defeat in the Gorton and Denton by-election, where the party fell to third behind the Greens and Reform UK.

The Scottish Labour leader called for Sir Keir Starmer to resign last month and has repeatedly stood by the comments.

He said: “The reason why I said what I said a few weeks ago, is I am the one that’s standing in front of people of Scotland in 10 weeks’ time.

“They deserve to know what my standards are, what I believe and what I would do if I became first minister. So I say judge me on me and I will be the man that fixes our NHS, that ends the 8am rush for a GP appointment, that brings back the family doctor, that embraces technology so that we can get faster treatment and faster diagnosis in our country.

He added: “I will be the first minister that stops the chronic waste of the SNP and delivers value for taxpayers’ money.”