Open this photo in gallery:

Under an agreement reached last May, Britain handed sovereignty of the Chagos Islands back to Mauritius and signed a 99-year lease for the Diego Garcia military base.Stringer ./Reuters

British Prime Minister Keir Starmer has spent months trying to appease Donald Trump, but he’s now facing the wrath of the U.S. President over Greenland and Britain’s decision to give up sovereignty of the Chagos Islands, a former colony in the Indian Ocean that’s home to the Diego Garcia military base.

This week Mr. Trump singled out the U.K. and seven other NATO allies for participating in a military exercise in Greenland, threatening to slap a 10 per cent tariff on imports from those countries. He said the tariffs will go even higher if Mr. Starmer and leaders from the other countries continue to oppose his plan to take over Greenland, a semi-autonomous part of Denmark.

On Tuesday, Mr. Trump issued a withering criticism of Mr. Starmer’s move to hand control of the Chagos Islands back to Mauritius, calling it an act of “great stupidity” even though the President previously supported the decision.

“Shockingly, our “brilliant” NATO Ally, the United Kingdom, is currently planning to give away the Island of Diego Garcia, the site of a vital U.S. Military Base, to Mauritius, and to do so FOR NO REASON WHATSOEVER,” the President wrote on social media. He added that “The UK giving away extremely important land is an act of GREAT STUPIDITY, and is another in a very long line of National Security reasons why Greenland has to be acquired.”

Under an agreement reached last May, Britain handed sovereignty of the islands back to Mauritius and signed a 99-year lease for the Diego Garcia base, which is jointly run by Britain and the U.S. The British government has also agreed to pay Mauritius around £101-million annually, or $188-million, in total costs.

The deal, which has yet to be ratified by the British Parliament, ended a long-running dispute over the Chagos Islands which dated back to colonial times.

The islands were separated from Mauritius in 1965 when it was a British colony. Britain paid the Mauritian government £3-million and forced thousands of people to move to make way for the Diego Garcia military complex.

Mauritius has long argued that it was forced into the deal in return for independence. In 2019, an advisory opinion of the International Court of Justice said Britain should hand the islands back.

Earlier: U.K. hands sovereignty of Chagos Islands to Mauritius in a deal to secure U.S. base

When the deal was signed, Mr. Starmer argued there was no alternative and said it would ensure the continuation of the Diego Garcia facility. “If we did not agree to this deal the legal situation would mean that we would not be able to prevent China or any other nation setting up their own bases on the outer islands or carrying out joint exercises near our base,” he said at the time.

Mr. Starmer also said “President Trump has welcomed the deal along with other allies, because they see the strategic importance of this base and that we cannot cede the ground to others who would seek to do us harm.”

Secretary of State Marco Rubio issued a statement at the time echoing Mr. Starmer. The agreement “reflects the enduring strength of the U.S.-U.K. relationship,” he said. Mr. Rubio added that Mr. Trump “expressed his support for this monumental achievement.”

That appeared to change on Monday with Mr. Trump’s social media post blasting Mr. Starmer.

Mr. Trump’s comments appear to have more to do with justifying his obsession with acquiring Greenland. He is expected to meet European leaders at the World Economic Forum in Davos this week to discuss his “need” for Greenland, which has been opposed by a host of NATO allies including Canada.

By reopening the Chagos Island decision, Mr. Trump has dealt another blow to Mr. Starmer who has gone out of his way to flatter the President. He invited Mr. Trump to a lavish state visit last fall with King Charles III and spent months carefully negotiating a trade deal that brought U.S. tariffs on British imports down to 10 per cent. Those taxes could now rise to 20 per cent because of Mr. Starmer’s stance on Greenland.

Mr. Trump’s comments were also seized upon by British critics of the Chagos deal including Reform UK leader Nigel Farage, who is a close friend of Mr. Trump’s. He and others have said the agreement weakens security because Mauritius has close ties to China.

“Thank goodness Trump has vetoed the surrender of the Chagos islands,” Mr. Farage wrote on X on Tuesday.

Conservative leader Kemi Badenoch also welcomed Mr. Trump’s broadside. “Keir Starmer’s plan to give away the Chagos Islands is a terrible policy that weakens UK security and hands away our sovereign territory,” she wrote on X.

A spokesman for the British government said the agreement was struck because the Diego Garcia base was under legal threat after various court decisions undermined Britain’s claim to the islands. The agreement secures the operations of the base for generations, the spokesman added, and it has been welcomed by the U.S., Australia, India, Japan and South Korea.

Mr. Starmer has yet to comment but on Monday he tried to keep up a brave face. He ruled out imposing retaliatory tariffs on the U.S. and said the relationship with America was too important to “throw away.”

“I think that this can be resolved, and should be resolved, through calm discussion,” he said referring to Greenland.