David Davis is facing a backlash over claims he told Theresa May to ignore the advice of her top Brexit civil servant as the Prime Minister’s allies warned against attacking individual mandarins.

The Brexit Secretary reportedly told Mrs May to disregard a plan backed by Oliver Robbins which would see Britain strike a customs partnership with Brussels after withdrawal.

Instead, Mr Davis urged the Prime Minister to place more of an emphasis on the advice of ministers in what has been interpreted in Whitehall as an attempt to get Mr Robbins sacked.

But Julian Smith, the Chief Whip, appeared to come to the defence of Mr Robbins as he insisted the civil service was focused on delivering Brexit and praised its “world class” advice.

Mr Smith’s comments were backed by Gavin Barwell, the Prime Minister’s chief of staff, amid reports of a showdown between him and Mr Davis over claims Mrs May’s aides had “war-gamed” whether the Brexit Secretary would quit if the UK stayed in a customs union with the EU.