Lahore -  President Trump has told Congress he wants to restrict US foreign aid to “America’s friends,” following a United Nations rebuke of his policy towards Israel.

“I am asking the Congress to pass legislation to help ensure American foreign-assistance dollars always serve American interests, and only go to America's friends,” Trump said in his first State of the Union speech on Tuesday, according to media reports.

Trump made four direct references to the Middle East in the hour-long speech that otherwise focused on his economic and immigration agenda. He praised his own decision to recognise Jerusalem as Israel's capital.

While he spoke about the success of the military campaign against the Islamic State in Syria and Iraq, the president stated that "there is much more work to be done", and promised that the United States would "continue our fight until ISIS is defeated".

The US president also touched on a number of other key foreign policy issues facing his administration, prominent among them North Korea and Iran. He asked Congress to amend the nuclear deal with Iran.

China and Russia too earned a mention, albiet briefly, in his speech as did Mexico and Venezuela.

"Last month," Trump said, "I took an action endorsed unanimously by the Senate just months before: I recognised Jerusalem as the capital of Israel," drawing substantial applause. Shortly afterwards, he added, "dozens of countries voted in the United Nations General Assembly against America's sovereign right to make this recognition. American taxpayers generously send those same countries billions of dollars in aid every year."

"That is why," he explained, "I am asking the Congress to pass legislation to help ensure American foreign-assistance dollars always serve American interests, and only go to America's friends." Trump also said that the United States will restore "clarity about our adversaries."

Speaking on Iran, he said: "When the people of Iran rose up against the crimes of their corrupt dictatorship, I did not stay silent. America stands with the people of Iran in their courageous struggle for freedom. I am asking Congress to address the fundamental flaws in the terrible Iran nuclear deal."

The president harshly attacked the North Korean regime, saying that "North Korea's reckless pursuit of nuclear missiles could very soon threaten our homeland. We are waging a campaign of maximum pressure to prevent that from happening."

Guantanamo prison

Trump also announced he would keep Guantanamo Bay open, breaking from his predecessor Barack Obama's lengthy and ultimately failed efforts to shutter the maligned detention facility.

"I just signed an order directing Secretary Mattis to reexamine our military detention policy and to keep open the detention facilities at Guantanamo Bay," he told the Congress. On the campaign trail, Trump famously vowed he would load Guantanamo with "bad dudes," and said it would be "fine" if US terror suspects were sent there for trial.

Under president George W Bush, the US military hastily constructed a prison camp on Guantanamo Bay, located on the US naval base on the eastern tip of Cuba, in the months following the US-led invasion of Afghanistan after the September 11, 2001 attacks.

At first, inmates were held in cages and fenced in with razor wire, and conditions for the orange jumpsuit-clad detainees provoked a global outcry in 2002. That early facility, known as Camp X-Ray, was soon replaced with more permanent structures and today, Guantanamo Bay consists of numerous high-security prison buildings.

At the height of its operations after 9/11, the facility held 780 people, detained mostly for their alleged ties to Al-Qaeda and the Taliban. Since then, hundreds have been transferred back to their home countries or other places. Some of the most notorious inmates, including several alleged 9/11 co-conspirators, among them accused mastermind Khalid Sheikh Mohammed, are still awaiting trial.

Their cases have been beset by legal woes at Guantanamo, where a bespoke criminal justice system grants detainees - who are considered "unprivileged enemy belligerents" - only some of the legal rights that US federal courts guarantee.

Of the 41 inmates remaining at Guantanamo, about 26 are trapped in legal purgatory. These so-called "forever prisoners" have never been charged - yet they have been deemed too dangerous to release. Some were cleared for release under Obama, but have been stranded at Guantanamo under the Trump administration.

 In 2009, soon after he was sworn in, Obama ordered the prison to be closed within a year, and no new inmate has been sent there since early 2008.

Political bickering, vehement Republican opposition and foreign allies' reluctance to take in the prisoners meant Obama could not close Guantanamo, though the population dropped from 242 to 41 under his watch. Since becoming president, Trump has toyed with the idea of sending Americans to Guantanamo, though federal judges would likely bar any such attempt.

In October, he suggested that the man accused of carrying out a deadly truck attack along a bike path in New York could be sent to Guantanamo, but he later backed off the idea. Another case that could potentially bring Guantanamo into legal focus is that of a US citizen who was captured in Syria and had allegedly been fighting for the Islamic State group.

The man, whose name has not been released, is apparently being held in Iraq. The American Civil Liberties Union has taken up his case and a federal judge has ruled that the US must give it advance notice before transferring the man overseas. That would allow time for the ACLU to mount a legal challenge.