Theresa May met the 72 sick and wounded servicemen and women who will represent Great Britain at this year’s Invictus Games in Sydney

David Davis has told the prime minister that her favoured plan for a customs partnership with the EU could be illegal under international trade law, The Times has learnt.

The Brexit secretary, who backed the Leave campaign, is understood to have raised the threat of a legal challenge in a letter to Theresa May setting out his opposition to the proposal.

He has the backing of other Brexit-supporting cabinet ministers, who warned that if the government backed the partnership plan now it would be too late to reverse the policy if significant legal obstacles emerged. “In that scenario you’d end up staying in the customs union because you’d have no other choice,” a senior source said.

The attorney-general’s office has been asked to provide an