LONDON — As grueling Brexit negotiations get closer, Britain needs a friend in Europe — and Theresa May thinks she has found one in Poland.

A meeting held in London Monday between the British prime minister and her Polish counterpart, Beata Szydło, went way beyond a routine head-to-head between national leaders.

Virtually every senior figure in May’s cabinet — Foreign Secretary Boris Johnson, Chancellor Philip Hammond, Home Secretary Amber Rudd, Defense Secretary Michael Fallon and Business Secretary Greg Clark — cleared their diaries to hold talks with their Polish opposite numbers.

At Downing Street, a reception was held to celebrate the contribution of Polish citizens in the U.K. — estimated to number around 950,000. And after arriving at RAF Northolt outside London, the Warsaw delegation visited the Polish War Memorial, which celebrates the contribution of the country’s citizens to the Allied cause in World War II — a reminder of the close emotional ties between the two nations.

It was all part of a deliberate charm offensive from May, who has singled out Szydło, with whom she is said to share good personal chemistry, as a vital potential ally at the Brexit negotiating table.

There is an irony in May reaching out to Poland, the biggest contributor to the sharp rise in immigration to the U.K. since 2004, which in turn proved such a potent motivation for many to vote for Brexit. But the Poles seem happy to play along.

Close ties, both leaders have calculated, are mutually beneficial. With an increasingly aggressive Russia on its eastern flank, Warsaw is determined to keep Britain, with its considerable defense capabilities, committed to European security. And with £15 billion in bilateral trade flowing between the two countries last year, Poland is also eyeing up an even closer trading partnership.

“We are aware of the fact that the British government does not have such summits with many other partners,” Szydło told reporters at a joint press conference in Downing Street following the talks. "And we appreciate it very much.”

May’s personal satisfaction with the Polish attitude was evident: If all European leaders approached Brexit “in the same constructive and positive manner” as Szydło, she told reporters, “then we can secure the right outcome for the U.K. and for our European neighbors.”

The message to Berlin, Paris, Rome, Dublin: Why can’t you be more like the Poles?

Goodwill hunting

To win more leverage over London, Warsaw will be prepared to play the good cop in the Brexit negotiations, said Polish-born British MP Daniel Kawczynski, who chairs the All-Party Parliamentary Group on Poland.

“They realize that if they are the cheerleaders for a fair and equitable, mutually beneficial Brexit for the U.K., that will create a huge amount of goodwill, which Britain will not forget,” Kawczynski said.

“We are hearing varying degrees of concern [about the Brexit negotiations] emanating from certain countries, like Malta, Ireland, France and others. Poland is singling itself out as being the most proactively positive country wanting a good Brexit negotiation. I think they are setting themselves up for a very good post-Brexit bilateral relationship with the U.K.”

“There’s a lot of emotional history between the two countries and the personal chemistry between the two prime ministers is very strong” — Daniel Kawczynski

Poland is not without its demands. Szydło has singled out guarantees of the residency rights, and access to social security, for Polish citizens living in the U.K. as her priority. But even here she was willing to cut May some slack. Significantly, when it was pointed out by journalists that she had secured no guarantees from May, Szydło declined to criticize her fellow prime minister, insisting that this was a matter to be negotiated at EU level, after May triggers Article 50, starting the formal exit process.

Tensions sparked by a wave of attacks on Polish citizens — including the killing of a Polish man in Harlow last September — in the U.K. following the EU referendum in June also appear to have cooled. May made a point of condemning the violence at the Downing Street reception, and Szydło publicly praised the U.K. government for its efforts to guarantee the safety of her compatriots in the U.K.

The Poles, Kawczynski said, have the same priorities as the U.K. on defense and trade, signaled by the pledges that emerged from this summit: most importantly the — largely symbolic — deployment of 150 U.K. troops to northeast Poland, close to the border with the Russian enclave Kaliningrad.

Ties between the two governments have strong foundations. Szydło’s Law and Justice party, though politically further to the right, particularly on social issues, is allied with May's Conservatives in the European Parliament's anti-federalist European Conservatives and Reformists group.

“There’s a lot of emotional history between the two countries and the personal chemistry between the two prime ministers is very strong,” Kawczynski said. “The constellation for a cooperative, mutually respectful engagement between Warsaw and London is there. It’s a replica for other capitals to follow. But the Poles are, if you pardon the pun, in pole position.”

Jan Cienski contributed to this article.