Donald Trump has said how much North Korea’s leader desires peace will be a deciding factor in easing tensions between his nation and the United States.

In an interview in Wisconsin, the US president complained that his predecessors should have dealt with North Korea’s pursuit of a nuclear arsenal, but said he was in the position now where he was “going to have to do something about it”.

He said the US wanted peace and he hoped North Korean ruler Kim Jong Un wanted the same, adding that would be “the end determination”.

Mr Trump has been pressuring China, North Korea’s benefactor, to help defuse the situation, but has also warned that the US will settle the issue alone if other countries will not help.

Meanwhile, US vice president Mike Pence warned North Korea not to test the resolve of America’s military, promising it would make an “overwhelming and effective” response to any use of conventional or nuclear weapons.

Speaking aboard the USS Ronald Reagan aircraft carrier at the US Yokosuka naval base in Tokyo Bay, Mr Pence said the Trump administration would continue to “work diligently” with allies like Japan, China and other global powers to apply economic and diplomatic pressure on Pyongyang.

But he told the 2,500 sailors: “As all of you know, readiness is the key.

“The United States of America will always seek peace but under President Trump, the shield stands guard and the sword stands ready.

“Those who would challenge our resolve or readiness should know we will defeat any attack and meet any use of conventional or nuclear weapons with an overwhelming and effective American response.”

Mr Pence’s speech on the aircraft carrier followed meetings in Tokyo on Tuesday with Japanese prime minister Shinzo Abe, where he noted that “all options are on the table”.

Mr Abe said it was a “matter of paramount importance for us to seek diplomatic efforts as well peaceable settlements of the issue”.

“But at the same time,” the prime minister said, “dialogue for the sake of dialogue is valueless and it is necessary for us to exercise pressure North Korea so that it comes forward and engages in this serious dialogue.”

US defence secretary Jim Mattis warned that North Korea’s latest failed missile launch was a reckless act of provocation and assured allies in Asia that America was ready to work to achieve a peaceful denuclearisation of the Korean Peninsula.

Mr Mattis condemned the attempted missile launch as he began a Middle East tour, telling reporters travelling with him to Saudi Arabia: “The leader of North Korea again recklessly tried to provoke something by launching a missile.”

The term “reckless” is one the North Koreans have used to describe continuing large-scale US and South Korean military exercises, which the North calls a dress rehearsal for an invasion.

Mr Mattis did not identify the type of missile but said it was not of intercontinental range, meaning it could not reach US territory.

He did not comment on what might have caused the missile to fail but an official said the missile was a Scud variant that the US calls a KN-17.

Mr Mattis credited China with trying to help get the North Korea situation “under control” with the goal of denuclearising the peninsula.