The SNP’s Holyrood operation has been accused of playing “petty politics” with the Gaza conflict after apparently trying to score points over demands for a ceasefire.

MSPs are expected to back an “immediate humanitarian ceasefire” in a consensus vote tomorrow after a belated agreement between Labour and the SNP.

The cross-party deal was only reached after Labour publicly complained about the SNP press office appearing to undermine a previous agreement between politicians.

An SNP motion calling for a ceasefire was defeated at Westminster last week after splitting Labour .

Sir Keir Starmer, who wanted “humanitarian pauses” in the fighting, was defied by more than a quarter of his MPs, with eight shadow ministers quitting in order to back a full ceasefire.

The SNP motion before Holyrood tomorrow is expected to get support from Labour MSPs, including leader Anas Sarwar, who has taken a different line from Sir Keir.

Scottish Labour said it reached an agreement on the SNP’s Holyrood motion and its own amendment last Friday to achieve the greatest possible consensus across the parliament. 

But the SNP press office then decided to “play petty politics” with the issue on Monday by issuing a release backing away from the deal, Labour said.

In the release, Mr Yousaf was quoted saying that Mr Sarwar must “stand firm and back an immediate ceasefire” and not “water down” the demand with his amendment. 

Labour sources said that was unfair as the SNP’s business manager already knew the text of the Labour amendment, and that it would strengthen the SNP’s motion not weaken it.

A Scottish Labour spokesman said: “This is a profoundly disappointing approach from the SNP publicly.

“Since last Thursday the SNP and Scottish Labour have been working on both a motion and amendment which represented the broad consensus across the parliament.

“Before this statement Business Managers from both parties had agreed to support both the SNP’s motion and Labour’s amendment.

“Scottish Labour’s amendment strengthens this motion by backing a ceasefire and adding calls for the International Criminal Court to investigate the conduct of all parties in this conflict.

“Despite agreement between Labour and the SNP on both the motion calling for an immediate ceasefire and the Labour amendment which goes further, the SNP have now indicated they want to play petty politics with this issue instead.

“The SNP press office should retract this shameful attack which tarnishes the work both parties have done behind the scenes on this important issue.”

In the SNP release, Mr Yousaf said: “The Scottish Parliament has an opportunity to unite to send a message of peace to world leaders and to those enduring untold suffering in the Middle East.

“The motion that will be debated condemns the barbaric and unjustifiable actions of Hamas, and echoes the calls of the UN Secretary-General for an immediate humanitarian ceasefire.

“This is a time for all of us to show leadership in the face of this humanitarian catastrophe. “Anas Sarwar must stand firm and back an immediate ceasefire. 

“The motion reflects his own public position on the issue. 

“An immediate ceasefire is the only way to end the tragic deaths of civilians. I urge MSPs of all parties to come together and say enough is enough - the time for a ceasefire is now.”

The SNP motion “unequivocally condemns… Hamas’s barbaric and unjustifiable terrorist attacks against Israeli citizens on 7 October”, demands the immediate and unconditional release of all hostages, agrees the killing of innocent civilians in Gaza must stop”.

It also reaffirms that “a credible, lasting and sustainable peace can only be based on the two-state solution through reinvigorated diplomatic and political efforts in the Middle East Peace Process”, and agrees “that all parties must agree to an immediate ceasefire”.

Labour’s amendment leaves the SNP text intact and expresses regret that Israeli PM Benjamin Netanyahu “has stated the will not even consider a ceasefire” and “calls on the international community to use every form of diplomacy to try and create the conditions on the ground to make a ceasefire a reality”.

It also calls on the International Criminal Court to investigate the conduct of all parties in this conflict and reaffirms “our commitment to a lasting peace and a two state solution with the end of illegal occupation, siege, and settlements”