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' and 'total weakness', months after he and senior US officials endorsed it. In response, 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 ($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 statement, the government said it had acted 'because the base on Diego Garcia was under threat,' citing previous court decisions that endangered its operations. The deal aims to ensure the operations of the joint US-UK military base 'for generations', with provisions ensuring the base remains secure and effective. Critics, including UK opposition leaders, have voiced their discontent with the agreement and Trump's recent comments, calling for a reconsideration of the deal.