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 stated 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 ($4.6bn) agreement 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 that morning, 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.'

Trump's comments reflect concerns that the deal could embolden adversaries such as China and Russia, as he declared the UK's actions an 'act of total weakness'. His skepticism has fueled criticism within UK political circles, with some lawmakers questioning the government's decisions.

Responding to Trump's remarks, the UK government reiterated that the agreement is vital for national security and is backed by allies, including members of the Five Eyes intelligence alliance.

As the agreement moves through Parliament, UK officials remain confident it will proceed, emphasizing its strategic importance in safeguarding the military capabilities at Diego Garcia.

Critics of the agreement, including some in the opposition and former UK leaders, have characterized it as a surrender of vital territory. As political tensions rise, both sides await the final decision on this contentious issue.