War with North Korea cannot be ruled out after its test of an intercontinental ballistic missile (ICBM), the US and South Korean militaries have warned.

“Self-restraint, which is a choice, is all that separates armistice and war,” senior generals said on Wednesday.

The two allies held a joint missile response drill following Kim Jong-un's Independence Day “gift package” — a confirmed ICBM test of a projectile with the potential to hit the US state of Alaska.

South Korea warned its neighbour conflict would mean its “destruction”, as it tested precision ballistic missiles alongside the US.

Gen Vincent Brooks, commander of US forces in Korea, and Gen Lee Sun-jin, chairman of the South's joint chiefs of staff, said in a statement: “We are able to change our choice when so ordered by our alliance's national leaders.

“It would be a grave mistake for anyone to believe anything to the contrary.

“As the combined live fire demonstrated, we may make resolute decisions any time, if the alliance commanders-in-chief order it. Whoever thinks differently is making a serious misjudgement.”

Separately, Pentagon spokeswoman Dana White said: “We remain prepared to defend ourselves and our allies and to use the full range of capabilities at our disposal against the growing threat from North Korea.”

In pictures: North Korea military drill Show all 8 1 /8 In pictures: North Korea military drill In pictures: North Korea military drill North Korea's leader Kim Jong Un watches a military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) is seen in this handout photo by North Korea's Korean Central News Agency (KCNA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) is seen in this handout photo by North Korea's Korean Central News Agency (KCNA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) KCNA/Handout via REUTERS In pictures: North Korea military drill This image made from video of still images broadcast in a news bulletin by North Korea's KRT, shows what was said to be a 'Combined Fire Demonstration' held to celebrate the 85th anniversary of the North Korean army, in Wonsan, North Korea. KRT via AP Video In pictures: North Korea military drill This image made from video of still images broadcast in a news bulletin by North Korea's KRT, shows what was said to be a 'Combined Fire Demonstration' held to celebrate the 85th anniversary of the North Korean army, in Wonsan, North Korea. KRT via AP Video In pictures: North Korea military drill This image made from video of still images broadcast in a news bulletin by North Korea's KRT, shows what was said to be a 'Combined Fire Demonstration' held to celebrate the 85th anniversary of the North Korean army, in Wonsan, North Korea. KRT via AP Video

Uncowed, Mr Kim has reportedly ordered his scientists to “frequently send big and small 'gift packages' to the Yankees”, thought to refer to more missile and nuclear weapons tests.

US Secretary of State Rex Tillerson said “global action is required to stop a global threat” and that “we will never accept a nuclear-armed North Korea”.

However, he said the US wanted “only the peaceful denuclearisation of the Korean Peninsula”.

Donald Trump and South Korean President Moon Jae-in agreed a plan to pursue talks with the North in order to curb its nuclear ambitions during their recent meeting in Washington.

As Vladimir Putin met with Xi Jinping for talks on international affairs, China and Russia proposed on Tuesday that North Korea end its testing programme while the US and South Korea hold off their large-scale military exercises.

Mr Trump has tried to increase pressure on Mr Jinping to rein in Mr Kim, for whom China is his sole major ally.