Washington (AFP) - The United States will continue to build its military defenses against North Korea, Donald Trump told Japanese Prime Minister Shinzo Abe on Wednesday, pledging all options are on the table.

The pair spoke by phone a day after Pyongyang fired a ballistic missile into the Sea of Japan, in what analysts said was a warning ahead of Trump's summit with China's Xi Jinping at which North Korea is set to dominate the agenda.

Trump "made clear that the United States will continue to strengthen its ability to deter and defend itself and its allies with the full range of its military capabilities," the White House said in a statement about the call.

"The president emphasised that the United States stands with its allies Japan and South Korea in the face of the serious threat that North Korea continues to pose."

Though the White House has previously made similar statements, the call came hours before Trump hosts Chinese President Xi for a two-day summit at his Mar-a-Lago estate in Florida.

Trump has said the United States is prepared to go it alone in bringing Pyongyang to heel if China -- North Korea's top ally -- does not step in.

In Tokyo, Abe said Trump reaffirmed that he is prepared to consider all possibilities in dealing with North Korea's nuclear and missile programs.

"I told (President Trump) that Japan is watching closely how China will cope with this North Korean issue," Abe told reporters after the 35-minute conversation.

"President Trump then made a strong remark, saying all options are on the table."

- 'In-flight failure' -

Abe said the two leaders agreed that North Korea's latest ballistic missile launch was a "dangerous provocation and poses a great threat to Japan's national security."

Japan sees itself as particularly vulnerable to North Korean missile launches, some of which have landed uncomfortably close to its northwestern coast.

Trump, since coming to power in January, has been careful to assure Japan that the US, which guarantees Tokyo's security, has its back in the face of North Korean provocations.

Story continues

Abe and Trump were meeting at the Mar-a-Lago estate in February when North Korea launched a rocket, setting off a controversy when the leaders set up an impromptu "situation room" in full view of the resort's guests.

That time the US leader responded by pledging "100 percent" support for Japan, which along with South Korea is Washington's key regional ally

Following North Korea's test of four missiles last month, Trump affirmed Washington's "ironclad commitment" to Japan and South Korea.

Trump's top diplomat, Secretary of State Rex Tillerson, last month during a trip to the region vowed a fresh strategy to counter the North Korean nuclear threat, admitting that all previous efforts had failed.

Wednesday's missile, launched days after Pyongyang warned of retaliation if the global community ramps up sanctions, flew 60 kilometres (about 40 miles), South Korea's defence ministry said.

A US defence official later said that the missile was an extended range Scud and had suffered an in-flight failure.

"A Scud ER (extended range) flew about 60 kilometres before suffering an in-flight failure and crashing into the Sea of Japan," also known as the East Sea, the official told AFP on condition of anonymity.