BORIS Johnson’s expected appointment as prime minister this week was hit by turmoil when Philip Hammond dramatically announced he would resign if the former foreign secretary is awarded the top job.

The SNP’s leader at Westminster Ian Blackford has said Hammond’s comments are a “massive blow” to Johnson, who could become the “shortest-serving prime minister in history”.

The Chancellor became the second Cabinet minister to say he will quit the UK Government if Johnson succeeds May on Wednesday and pursues a no-deal Brexit. Asked on BBC One’s Andrew Marr show if he thought he would be sacked, Hammond said: “No, I’m sure I’m not going to be sacked because I’m going to resign before we get to that point.

“Assuming that Boris Johnson becomes the next prime minister, I understand that his conditions for serving in his government would include accepting a no-deal exit on the October 31, and it’s not something that I could ever sign up to.

“It’s very important that the prime minister is able to have a chancellor who is closely aligned with him in terms of policy, and I therefore intend to resign to Theresa May before she goes to the Palace to tender her own resignation on Wednesday.”

READ MORE: Johnson as PM shows the lunatics now really are taking over the asylum​

Hammond’s intervention comes after Justice Secretary David Gauke – a former Remainer – told the Sunday Times he would quit on Wednesday if Johnson enters No 10.

Gauke said: “If the test of loyalty to stay in the Cabinet is a commitment to support no-deal on October 31 – which, to be fair to him, Boris has consistently said – then that’s not something I’m prepared to sign up to.

“I recognise that this spell in government is coming to an end. Given that I’ve been in the Cabinet since Theresa May came to power, I think the appropriate thing is for me to resign to her.”

The SNP said Hammond’s resignation announcement was the latest sign parliamentary arithmetic could stop Johnson. A majority of MPs are opposed to a no-deal Brexit which the UK Government official forecasters, the Office for Budgetary Responsibility, has warned would plunge the UK into recession and shrink the economy by 2%.

Blackford said: “Nobody was expecting Philip Hammond to stay in the Treasury in the event of a Boris Johnson premiership.

“But his resignation on Sunday morning TV was a dramatic blow to Boris Johnson before he’s even formally won the keys to Downing Street.

The National:

“The threat of a no-deal Brexit is very real – but what’s now clear is that senior figures within the Tory party could join others in stopping it. That offers us an enormous opportunity – and could leave Boris Johnson as the shortest-serving Prime Minister in history.”

Hammond, who has been in No 11 for three years, has been a vocal critic of a no-deal Brexit – something Johnson, the Tory leadership frontrunner has vowed to achieve “do or die”, even if he cannot secure changes to the Withdrawal Agreement.

Hammond – who is dubbed Spreadsheet Philip due to his dry image – had been widely expected to leave office when May steps down on Wednesday. Last week, he put down a marker about his willingness to cause trouble on the backbenches for the next prime minister as he and three other Cabinet ministers backed a measure aimed at preventing Johnson suspending Parliament in order to force through a no-deal Brexit.

The Chancellor, Gauke, Business Secretary Greg Clark and International Development Secretary Rory Stewart did not support the Government in the vote.

He has previously promised to do “everything” in his power to block a no-deal Brexit and last week left open the possibility of voting to bring down a Conservative government led by Johnson if the UK was on course to crash out of the EU without a deal.

Asked on Marr whether he would vote against the new prime minister in a vote of no confidence, Hammond said: “I don’t think it will get to that and, while many clever people have been scratching their heads, parliamentary process is extraordinarily complex and sometimes arcane.

“I am confident that Parliament does have a way of preventing a no-deal exit on October 31 without parliamentary consent and I intend to work with others to ensure Parliament uses its power to make sure that the new government can’t do that.

He continued: “The point of that is not to inflict some defeat on the new government, it is to ensure that the new government focuses then on trying to achieve a sensible, negotiated settlement with the EU that protects our economy and allows us all to get on with our lives.”

Earlier, Defence Minister Tobias Ellwood repeatedly sidestepped questions over whether he would serve in government led by Johnson.

“I really get frustrated with this energy towards no deal. I know all my parliamentary colleagues on all sides of the House recognise the dangers of no-deal,” he told Sky’s Sophy Ridge on Sunday. “The fact that we keep talking about it – it isn’t a solution.”