The leaders of the G7 nations issued a joint communique on Saturday that found common ground on counter-terrorism, migration as well as trade, though US President Donald Trump had shown reluctance to agree with others over the last.

Trump, however, appeared to have backed down from his fiercely protectionist stance on trade.

The G7 — Canada, France, Germany, Italy, Japan, Britain, the US — “reiterate our commitment to keep our markets open and to fight protectionism, while standing firm against all unfair trade practices”, the joint communique said, Xinhua reported.

The leaders also reached a compromise on migration, acknowledging that states “share a responsibility” in dealing with the mass exodus of men, women and children from war and famine zones in Africa and the Middle East.

The lion’s share of the document was dedicated to ongoing conflicts in Libya, Syria, and Iraq, which are breeding grounds for fundamentalist terrorism.

“We commit to continuing … efforts … to complete the liberation of the Islamic State-held territories, in particular Mosul and Raqqa, in the pursuit of the IS’s final destruction,” read the communique, using the various acronyms used for the Islamic State.

The IS actively urges its followers to carry out terrorist attacks. It has claimed Monday’s suicide bomb blast in the British city of Manchester that claimed 22 lives, as well as responsibility for the slaughter of dozens of Coptic Christians in Cairo on Palm Sunday.

“It will be impossible to defeat terrorism without a political settlement” in Syria, the G7 document said.

They also stressed the need to stop North Korea nuclear weapons programme. North Korea “increasingly poses new levels of threat of a grave nature to international peace and stability”, the G7 statement said.

The communique came on the second and final day of the 43rd G7 summit.