Chancellor Philip Hammond is prepared to resign over Theresa May’s plans to spend billions of pounds on projects to shore up her legacy, it is understood.

Senior Government sources have told the Press Association that tensions between Treasury and Number 10 officials have reached boiling point over the Prime Minister’s spending intentions.

Mr Hammond is understood to be so against the plans that he is prepared to quit the Government in what would be an extraordinary move just weeks before the PM leaves office.

Tensions have surfaced over Mrs May’s intention to spend up to £9 billion per year over three years on education, totalling £27 billion, including plans to build new schools and pay teachers higher wages, the well-placed source said.

READ MORE: Jeremy Hunt and Michael Gove 'would not allow indyref2'

The Chancellor is thought to be particularly angry that the plans could tie the hands of her successor, which the source said was “immoral” and “irresponsible”.

“Everyone knows this Government is coming to an end and ministers are desperately trying to shore up their legacy by splashing the cash,” they told the Press Association.

“Not only is it immoral to take away the choices of the next PM, it’s irresponsible  – especially as no-deal looms.

“There are times it’s reached boiling point with the Chancellor prepared to just walk away.

Prime Minister’s QuestionsTheresa May has made spending pledges as she prepares to leave Downing Street (David Mirzoeff/PA)

“No-one’s denying there are some spending pressures but these are decisions to be taken by a successor in the round – not wasted on frivolous vanity projects or an attempt to bind the hands of the next person by making three-year pledges on their behalf.”

A source close to the Chancellor added: “The Chancellor is 100% dedicated to getting on with the day job – promoting economic stability and ensuring prudent public finances.

READ MORE: Boris Johnson - Stop Scottish people from becoming PM

“He has overseen great success with rising employment and wages and wants to see this continue.”

Number 10 is understood to be asking Mr Hammond to free up money from the £26.6 billion “war chest” he set aside in case of a no-deal Brexit to fund the plans.

In the Spring Statement in March Mr Hammond said he would decide in the Spending Review how to share the proceeds from any Brexit “deal dividend” – if an agreement passed the House of Commons.

A Downing Street source said: “It is a fact though that school funding in England is at its highest ever level – rising from almost £41 billion in 2017-18 to £43.5 billion by 2019-20.

“But while there’s more money going into our schools than ever before, we know they face budgeting challenges.

READ MORE: Matt Hancock backs Boris Johnson to be next Prime Minister

“The Education Secretary has been clear he will back head teachers to have the resources they need to deliver a world class education.”

Later, No 10 said the PM's future spending plans did not come up in Cabinet but noted that the Chancellor offered his views "across a wide range of topics".

"You have seen significant announcements made by the Prime Minister with full Cabinet support in recent days, including one today in relation to protecting consumer rights, one yesterday in relation to mental health and the commitment on climate change," said Mrs May's spokesman.

Asked if Mrs May would like the Chancellor not to resign, he replied: "It's been quite hard keeping up with all the anonymous quotes from friends of the Chancellor in recent days but I would simply say he was in Cabinet this morning and offering his views across a wide range of topics."

The PM’s tenure in Downing St will end next month and she has already sought to define her legacy with pledges to tackle climate change, mental health and modern slavery.

On Monday, she set out plans for new teachers to receive training on how to spot the signs of mental health problems in youngsters, under a plan to overhaul society’s approach to the issue.