The UK government has defended a deal to give the Chagos Islands to Mauritius and lease back a key military base, following criticism from US President Donald Trump over its handling.

In a post on social media, Trump labelled the move as an 'act of great stupidity', months after he and senior US officials endorsed it. Later on Tuesday, he confirmed he was 'against' the deal.

The UK government said it would 'never compromise on our national security', while the prime minister's official spokesperson insisted the US still supported the move.

The UK signed the £3.4bn deal in May, under which it would retain control of a UK-US military base on the largest of the islands, Diego Garcia.

In a post on his Truth Social platform, Trump stated: 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. There is no doubt that China and Russia have noticed this act of total weakness. This is an act of GREAT STUPIDITY.

In response, the prime minister's spokesperson reiterated that the deal had previously been endorsed by US officials, with backing from the UK's Five Eyes allies, including Canada, Australia, and New Zealand.

The deal signifies a resolution of a long-standing dispute regarding sovereignty over the Chagos Islands, separated from Mauritius in 1965. Under the agreement, the UK would hand over governance to Mauritius while retaining military access for 99 years at a substantial lease cost.

Despite Trump's unexpected turn against the deal, British officials emphasize their commitment to maintaining the strategic military base on Diego Garcia, cited as vital for national defense.

Moreover, critiques arise from various political factions in the UK, suggesting the government might reconsider their stance in light of Trump's statements, highlighting the complex interplay of international relations and domestic political ramifications.