Philip Hammond has quit as Chancellor ahead of Boris Johnson entering Downing Street.

Mr Hammond, a staunch opponent of a no-deal Brexit, said the new Prime Minister should be “free to choose a chancellor who is fully aligned with his policy position”.

New Tory leader Mr Johnson has repeatedly promised to take the UK out of the European Union on October 31, with or without a deal.

In his resignation letter to Theresa May, Mr Hammond said: “Despite the uncertainty created by the unresolved issue of Brexit, we have been able to make notable progress in rebuilding the public finances and preparing the British economy for the opportunities ahead.”

READ MORE: SNP mavericks try to revive independence 'Plan B' 

In a pointed message to Mr Johnson, the outgoing Chancellor warned that the headroom built up in the public finances could only be used for tax cuts and spending boosts if a Brexit deal was secured.

In his letter to Mrs May, ahead of her own resignation as Prime Minister, he said: “We bequeath to our successors genuine choices, once a Brexit deal is done: the ability to choose, within the fiscal rules, between increased public spending, reduced taxes, higher investment or progress towards faster debt reduction – or some combination of all four.

“After a decade when the aftermath of the 2008-09 recession meant we had no choices, this is a luxury which our successors should use wisely.”

Theresa May speaks during her last PMQsTheresa May speaks during her last PMQs (House of Commons/PA)

PA understands Mr Hammond handed his resignation to Mrs May after her final session of Prime Minister’s Questions.

READ MORE: Labour 'would renegotiate Brexit deal – before telling voters not to back it' 

It is highly unlikely he would have been given a job by Mr Johnson even if he had wished to carry on given their differences over Brexit.