Scotland’s Education Secretary has been accused of breaching the ministerial code after reportedly delaying rail works to benefit her constituents while she was transport minister.

The First Minister has been urged to investigate the claims Jenny Gilruth used her position as transport minister to force planned rail works to be delayed.

Ms Gilruth refused to say whether she has broken the ministerial code, telling journalists she took decisions "in the best interests of the travelling public".

Douglas Ross has insisted the intervention by Ms Gilruth was a “clear-cut sackable offence” which cost taxpayers more money.

He has formally written to the First Minister, requesting that Ms Gilruth be investigated over a potential breach of the ministerial code.

A Scottish Government spokesperson said: “The letter has been received and we will respond in due course.”

But First Minister Humza Yousaf accused the Conservatives “throwing mud” and then defended her "perfectly legitimate reasons" to make an intervention. 

Asked by journalists if she broke the ministerial code, Ms Gilruth said: "I've got nothing further to add other than the fact as transport minister, I took every decision in that post in the best interests of the travelling public and the people of Scotland."

The row centres on proposed line electrification work between Edinburgh Haymarket and Dalmeny in West Lothian, which would have caused eight days of disruption from Boxing Day last year.

Read more: FMQs Recap: Humza Yousaf defends Jenny Gilruth over ministerial code breach claim

Ms Gilruth, who represents Mid Fife and Glenrothes as an MSP and is now Education Secretary, asked for the works to be postponed.

The Tories say that officials told the Scottish Government this would lead to an extra £1 million in cost and cause disruption to 9,000 passengers a day due to the work taking place at non-holiday times.

The work has still not been carried out.

Speaking at First Minister’s Questions, Mr Ross claimed Ms Gilruth “appears to have forced a change in order to give preferential treatment to her constituents at a higher cost to taxpayers and far more disruption to passengers”.

The FM said Mr Ross was making “very serious accusations indeed” and there would be an “appropriate investigation”.

However, he said the situation was not as Mr Ross described, saying the decision was made for the “correct reasons” in order to benefit the “entire network”.

Mr Ross held up pages of emails received under freedom of information rules.

Read more: Gilruth: 'No prevarication' over UNCRC 587 days after court loss

According to the Tory leader, ScotRail officials told the Scottish Government the changes would lead to “greater cost, with more customers disrupted or inconvenienced with the revised access plan”.

Mr Yousaf said the works would have led to disruption further afield than Fife and Ms Gilruth had said she wanted more done to avoid more delays on the rail network over the festive period.

Mr Ross said: “She should not even have been involved in this decision, she should have recused herself because of the clear potential for a conflict of interest.”

He suggested the “political interference” forced Chris Gibb to resign as chief executive of ScotRail Holdings.

There was speculation last year that Mr Gibbs had quit after being "micro-managed by the transport minister and Transport Scotland".

Mr Ross said that Ms Gilruth’s decision led to a poorer service and “looks like a clear breach of the ministerial code”.

He added that it was a “clear-cut sackable offence”.

Mr Yousaf said: “What (Mr Ross) is hoping to do, because he is undoubtedly desperate, is throwing as much mud as possible and hoping that some of it sticks.”

The First Minister said Mr Ross was being “selective” in his reading of the emails.

He said it was “pretty clear” that Ms Gilruth made the decision to minimise disruption for passengers across the network.

Read more: Green MSP barred from committee meeting over rule breach

Speaking after FMQs, Mr Ross said: “It is ridiculous that Humza Yousaf is defending Jenny Gilruth when she went against the advice of Network Rail, ScotRail and Transport Scotland.

“The SNP leader struggled to come up with any excuses to defend this dire decision.

“Jenny Gilruth shouldn’t even have been involved in this, given the relevance to her constituency. She should have recused herself because of the clear potential for a conflict of interest.

“This looks like a breach of the ministerial code and a clear-cut sackable offence. It requires an urgent independent investigation.”

Asked by the media after FMQs if there would be an investigation into Ms Gilruth’s alleged misconduct, Mr Yousaf said: “I will look at the detail, as I said to Douglas Ross. 

“I will look over the many FoIs there have been on this issue. 

“I will look into the detail of it.

“From the information that I have in front of me, it does not look like there has been a breach.

“I can see perfectly legitimate reasons why Jenny Gilruth made the decisions she made at the time.

“But I have promised Douglas Ross I will look at it in further detail and I will write to him in very, very short order on that.”