Germany’s interior minister has warned Brussels it risks putting lives at risk with a dogmatic approach to Brexit that would hamper reaching an “unlimited” security deal with Britain.

The letter from Horst Seehofer, dated June 27 and seen by the Financial Times, is one of the bluntest internal criticisms of the EU’s negotiating strategy on Brexit since the UK voted to leave the bloc in 2016.

Writing to the European Commission, Mr Seehofer diverged from Berlin’s official policy to argue that “ensuring the security of citizens in Europe should take precedence over all other aspects of exit negotiations”.

His letter continued: “Weakening the European security architecture would affect all EU citizens and undermine their fundamental need for security. The ever present threat of cross-border terrorism shows the need for unlimited co-operation in future.”

Mr Seehofer’s letter was not co-ordinated with the chancellery or any other German ministry, according to people briefed on its origins. A spokeswoman for the German government declined to comment on “correspondence between the interior ministry and the EU”.

It is obvious that the UK will no longer be a member of the union after its withdrawal but that must not lead to less security for our citizens

The interior minister, who is also leader of the Bavarian sister party of chancellor Angela Merkel’s Christian Democrats, wrote the letter while he was engaged in a bitter dispute with Ms Merkel that pushed the German government to the brink of collapse. The row over asylum policy nearly blew apart the 70-year-old alliance between Mr Seehofer’s CSU and Ms Merkel’s CDU that is one of the linchpins of the German political system.

London has long complained that Brussels is taking a dangerously dogmatic approach to Brexit, including issuing direct warnings from spy chiefs. But until now it has had little success in breaking the EU’s unified position on security issues, which has stressed the clear legal limits to co-operation with non-members.

Mr Seehofer’s intervention will be a welcome boost for Theresa May, UK prime minister, who met Ms Merkel in Berlin on Thursday to pitch her vision for close partnership, including seamless security co-operation that goes beyond any existing precedent.

His letter creates a new faultline with the chancellor, who has played a pivotal role in shaping the EU’s approach on Brexit, emphasising the unity of the EU over the need to cut a deal with Britain.

German chancellor Angela Merkel (right) and UK prime minister Theresa May met for talks in Berlin on Thursday © EPA

Before her talks with Mrs May, Ms Merkel said she wanted to “remain close” to the UK, “especially in the area of foreign and security policy”. But she has yet to show concern about the commission’s negotiating approach or encourage more flexibility.

One EU diplomat working on Brexit described Mr Seehofer’s letter as “putting a finger in the eye of everybody, including Merkel”.

The letter also earned a rebuke from European Commission President Jean-Claude Juncker. “When we are talking about heavy and difficult negotiations you should not necessarily follow all the reflexes that internal politics might lead you towards,” he said. “I think cohesion and consistency are very important among the 27.”

Mrs May’s visit came ahead of Friday’s crucial UK cabinet meeting at Chequers, the prime minister’s country retreat, where ministers will try to thrash out a common position on Britain’s future relationship with the EU’s 27 remaining states. The outcome is set to be published in a crucial white paper next week.

Ms Merkel said that “time is pressing, and we really need to have the political framework clarified by October”.

Mr Seehofer’s views on the future security relationship with the UK are not widely shared among other leaders in the EU. Michel Barnier, the EU’s chief Brexit negotiator, has stressed the need for “realism” about post-Brexit security relations, which recognises “what will no longer be possible”.

Specifically he has ruled out continued full access to EU databases used for security, policing and border control if the UK maintains its existing red line positions. His position is strongly supported by France.

Mr Seehofer, by contrast, is pushing for UK to continue to enjoy full access to databases after Brexit, including: the Schengen Information System for border control; passenger name records for flights; Europol for policing; and the EU’s criminal records system — Ecris.

“It is obvious that the UK will no longer be a member of the union after its withdrawal but that must not lead to less security for our citizens,” Mr Seehofer wrote, insisting the “full security partnership with the UK” must encompass “the entire EU security architecture”.

“Otherwise, without a new basis for a security partnership, we in Germany would have to delete all UK data from our databases,” he added. “Once made, such a decision is essentially irreversible.”

Mrs May has appealed for a new UK-EU security treaty after Brexit, urging EU leaders in a speech to the Munich Security Conference in February to set aside “rigid institutional structures” and “deep-seated ideology”.

She repeated some of those arguments at a summit of EU leaders last week but with little sign of having shifted opinion. Mark Rutte, the Dutch premier, said that while post-Brexit security relations should remain close, “with the UK leaving, things will not stay as they are”.