Donald Trump has said he can override a directive from congress preventing him from recognising Russian sovereignty over Crimea.

The US president quietly issued a statement on Monday evening, hours after signing a military spending bill, claiming dozens of the bill’s statutes to be unconstitutional intrusions on his powers as commander-in-chief.

Among the provisions in the $716bn (£563bn) bill is a ban on spending Department of Defense money on “any activity that recognises the sovereignty of the Russian Federation over Crimea”, a region in Ukraine annexed by Moscow in 2014 during a period of regional political upheaval.

The bill, titled the John S McCain National Defense Authorization Act for Fiscal Year 2019, does allow for the directive to be waived, but only on condition the secretaries of defence and state provide explanations to relevant senate and house committees.

However, in a statement published on the White House website, Mr Trump said the provision was an attempt to “dictate the position” of the US in foreign military affairs.

He would treat the directive “consistent with the president’s exclusive constitutional authorities”, which Mr Trump claimed included the authority “to determine the terms upon which recognition is given to foreign sovereigns”.

Trump aides discussing Trump using the racial slur

Mr Trump also refused to abide by two provisions attempting to limit his ability to transfer detainees in or out of Guantanamo Bay, the controversial US naval base in Cuba often used to imprison suspected terrorist without trial.

“I fully intend to keep open that detention facility and to use it, as necessary or appropriate, for detention operations,” he said, adding: “I reiterate the longstanding position of the executive branch that, under certain circumstances, restrictions on the President’s authority to transfer detainees violates constitutional separation-of-powers principles.”

During the signing ceremony at Fort Drum, New York state, on Monday, Mr Trump pointedly failed to mention John McCain, the Republican senator whom congress named the bill in honour of.

Trump in Helsinki: Putin meeting and protests Show all 16 1 /16 Trump in Helsinki: Putin meeting and protests Trump in Helsinki: Putin meeting and protests President Trump meets with Russian President Vladimir Putin in Helsinki Reuters Trump in Helsinki: Putin meeting and protests An advert from Finnish newspaper Helsingin Sanomat is on display in Helsinki Reuters Trump in Helsinki: Putin meeting and protests President Trump in a meeting with Finnish President Sauli Niinisto AFP/Getty Trump in Helsinki: Putin meeting and protests President Trump meets with Finnish President Sauli Niinisto in Helsinki EPA Trump in Helsinki: Putin meeting and protests President Trump talks with Finnish President Sauli Niinisto in Mantyniemi, the official residence of the Finnish President EPA Trump in Helsinki: Putin meeting and protests US, Finnish and Russian flags fly in front of the Presidential Palace in Helsinki EPA Trump in Helsinki: Putin meeting and protests A protester wears a mask featuring a portrait of Russian President Vladimir Putin during the so-called "Helsinki against Trump and Putin" demonstration on July 16, 2018, in the Finnish capital Helsinki. The US and Russian leaders opened an historic summit in Helsinki on Monday, with Donald Trump promising an "extraordinary relationship" and Vladimir Putin saying it was high time to thrash out disputes around the world. / AFP PHOTO / Jonathan NACKSTRANDJONATHAN NACKSTRAND/AFP/Getty Images JONATHAN NACKSTRAND AFP/Getty Trump in Helsinki: Putin meeting and protests Vladimir Putin gifts a football to President Trump at the press conference that followed their meeting AP Trump in Helsinki: Putin meeting and protests Trump supporters hold banners during a demonstration in Helsinki AFP/Getty Trump in Helsinki: Putin meeting and protests People protest for women's reproductive rights in Helsinki's Senate Square Reuters Trump in Helsinki: Putin meeting and protests A crowd watches the motorcade transporting President Trump through Helsinki AFP/Getty Trump in Helsinki: Putin meeting and protests Russian President Putin drives through Helsinki on his way to meet with President Trump EPA Trump in Helsinki: Putin meeting and protests A man in the audience of the joint press conference holds up a sign sign that reads "NUCLEAR WEAPON BAN TREATY". REUTERS Trump in Helsinki: Putin meeting and protests A man is removed from the joint press conference in Helsinki. Security removed the man after he pulled out a sign that read "NUCLEAR WEAPON BAN TREATY". REUTERS Trump in Helsinki: Putin meeting and protests President Trump and Russia's President Putin sit for a working lunch in Finland's Presidential Palace AFP/Getty Trump in Helsinki: Putin meeting and protests President Trump meets with Russian President Vladimir Putin in Helsinki Reuters

It appeared to be another slight in the long-running feud between the pair, which was first sparked in 2016 when Mr Trump said the military veteran was “not a war hero” because he was captured during the Vietnam war.