An eleventh-hour deal has been struck to try to put a lid on a damaging frontbench pre-selection stoush that has threatened to consume the New South Wales Government.

Treasurer Dominic Perrottet has backed down from challenging his ministerial colleague Ray Williams for the seat of Castle Hill.

The ABC understands a deal was struck, which will see him move to the seat of Epping, which is currently held by Damien Tudehope, while Mr Tudehope will take an Upper House spot.

Treasurer Dominic Perrotet and Gladys Berejiklian at a press conference last year. ( AAP: David Moir )

Premier Gladys Berejiklian gave the warring factions until 6.00pm to reach a peace deal and one was finally struck with just five minutes to spare.

Last week, the Treasurer announced he wanted to reclaim the seat of Castle Hill from his colleague Ray Williams.

Mr Perrottet claimed that his current seat of Hawkesbury took him from his family.

Mr Williams responded with an explosive media statement demanding Mr Perrottet step down as deputy Liberal leader following a tense phone call between the two on Friday morning, and threatened to call a spill motion on Tuesday.

Mr Perrottet held the seat of Castle Hill until he swapped to Mr Williams' old seat of Hawkesbury after a redistribution and factional deal in the lead-up to the last election.

There was widespread anger among Government MPs about the Treasurer's behaviour.

"Throughout this Dom has acted like a spoiled brat with a born-to-rule mentality," one Liberal MP told the ABC.

Another Liberal MP worries this clash will see them lose Government.

"We are pretty much handing the scissors to Labor to cut the ribbon on all our infrastructure projects after the March election," the MP said.

The very bitter civil war comes just four weeks after the Premier slammed her federal colleagues for the spill that cost Malcolm Turnbull the prime ministership, and installed Scott Morrison as the party leader.

In a statement released on Friday afternoon, Ms Berejiklian said pre-selections were a matter for the party members and reiterated her support for the Treasurer who had her "full confidence as deputy leader".

On Monday, the Premier was behind closed doors trying to broker a peace deal in the stand-off between Mr Perrottet and Mr Williams, missing a key photo opportunity with the Prime Minister.

It is understood Mr Williams was offered an Upper House seat which would give him another eight years in Parliament but in the end, it was Mr Perrottet who backed down, stepping aside from the fight for Castle Hill.