British Prime Minister Theresa May, left and U.S. President Donald Trump attend a joint press conference following their meeting at Chequers, in Buckinghamshire, England, Friday, July 13, 2018. (Jack Taylor/Pool Photo via AP)

Britain's Prime Minister Theresa May and U.S. President Donald Trump answer questions during a joint press conference following their meeting at Chequers, in Buckinghamshire, England, Friday, July 13, 2018. (Jack Taylor/Pool Photo via AP)

President Donald Trump with British Prime Minister Theresa May during their joint news conference at Chequers, in Buckinghamshire, England, Friday, July 13, 2018. (AP Photo/Pablo Martinez Monsivais)

President Donald Trump and British Prime Minister Theresa May hold hands at the conclusion of their joint news conference at Chequers, in Buckinghamshire, England, Friday, July 13, 2018. (AP Photo/Pablo Martinez Monsivais)

LONDON (AP) — In the midst of a messy political crisis at home over Britain's impending exit from the European Union, Prime Minister Theresa May revealed Sunday that Donald Trump gave her this piece of advice: Sue the EU, don't negotiate.

A bemused May turned him down. But the exchange was the latest example of the awkward dance between the U.S. and Britain, with the two leaders attempting to put on a public show of friendliness despite clear strains over trade, the EU and their approaches to diplomacy.

Trump told reporters on Friday that he had given May advice about how to deal with the EU that she found too "brutal." Asked in a BBC interview Sunday what that was, May responded with an amused expression: "He told me I should sue the EU. Not go into negotiation, sue them."

With a laugh, she added: "Actually, no. We're going into negotiations with them."

In the past few days, Trump's first official visit to Britain has been steered wildly off course by a series of humiliating remarks he has made about May's leadership — especially her handling of the tense Brexit negotiations.

In an explosive interview with The Sun newspaper published Thursday — just as May was hosting Trump at a lavish black-tie dinner — Trump said the British leader's approach likely "killed" chances of a free-trade deal with the United States. He said he had told May how to conduct Brexit negotiations, "but she didn't listen to me."

He also praised May's rival, Boris Johnson, who quit last week as foreign secretary to protest May's Brexit plans. Trump claimed Johnson would make a "great prime minister."

The comments shocked many in Britain — even May's opponents — and couldn't have come at a worse time for the British prime minister, who is facing a crisis over Brexit from within her own ranks. Her Conservative government is deeply split between supporters of a clean break with the EU and those who want to keep close ties with the bloc, Britain's biggest trading partner.

The U.S. president later apologized and sought to soften the blow, telling reporters at a joint news conference Friday that May is an "incredible woman" who is "doing a fantastic job" as prime minister.

Asked to rate U.S.-U.K. relations, Trump called them the "highest level of special." He added it was up to May how to handle Brexit, as long as the U.S. "can trade and we don't have any restrictions" on commerce with the United Kingdom.

On Sunday, May seemed to point to Trump's inconsistent advice when she said that as well as telling her to "sue" the EU, he also suggested not walking away from the negotiations.

May didn't elaborate, and it wasn't clear what grounds Britain would have to sue the EU, how it would work or to what purpose.

But Trump has made clear his animosity toward the EU, aggressively criticizing his European NATO allies for taking advantage of the U.S. on trade and defense spending. In a CBS interview Saturday, he called the EU a trade "foe."

May's government has just published its long-awaited Brexit plans, which propose to keep Britain and the EU in a free market for goods, with a more distant relationship for services. That has infuriated fervent Brexit supporters, who see it as a bad deal. Along with Johnson, the man who had been leading the Brexit negotiations, David Davis, also quit in protest.

Ahead of a key week of Parliament votes on trade and customs policy, May warned party rebels on Sunday they should fall into line, saying wrecking her Brexit blueprint could result in disaster.

"We need to keep our eyes on the prize. If we don't, we risk ending up with no Brexit at all," she wrote in an article in the Mail on Sunday newspaper.

She acknowledged that some lawmakers had doubts about her plans to stick to a "common rule book" with the bloc for goods and agricultural products in return for free trade, without tariffs or border customs checks, but insisted she couldn't see a viable alternative.

Her appeal didn't convince prominent Conservative lawmaker Jacob Rees-Mogg, who accused May of only half-heartedly supporting Brexit. May, he contended, was "a Remainer who remains a Remainer."