North Korea has fired a ballistic missile into the Sea of Japan, according to South Korea and the US military.

The development comes just days after North Korea threatened to retaliate if the global community expanded sanctions targeting the country.

South Korea's defence ministry said the missile had flown about 60km on Wednesday. It was launched from the Sinpo region on North Korea's eastern coast.

"The military is keeping a close watch over North Korea's provocative moves and maintaining a high defence posture," it said.

The US military said it was a KN-15 medium-range ballistic missile which it had determined posed no threat to the US mainland.

OPINION: What's on Kim Jong-un's mind?

Rex Tillerson, the US secretary of state, confirmed that North Korea had launched "yet another" intermediate-range ballistic missile.

"The United States has spoken enough about North Korea. We have no further comment," he said in a statement.

Japan condemned the launch and said it violated UN Security Council resolutions.

"Japan never tolerates North Korea's repeated provocative actions. The government strictly protested and strongly condemned it," Yoshihide Suga, the chief cabinet secretary, said.

Trump-Xi meeting

North Korea is on a quest to develop a long-range missile capable of hitting the US mainland with a nuclear warhead, and has so far staged five nuclear tests, two of them last year.

Wednesday's developments came after US President Donald Trump said, before a meeting with his Chinese counterpart Xi Jinping, that the US was prepared to go it alone in bringing the North to heel if China did not step in.

North Korea's foreign ministry on Monday criticised the US for its tough talk and for an ongoing joint military exercise with South Korea and Japan which the North sees as a dress rehearsal for invasion.

The "reckless actions" are driving the tense situation on the Korean peninsula "to the brink of a war", a ministry spokesman was quoted as saying by the official KCNA news agency.

The idea that the US could deprive North Korea of its "nuclear deterrent" through sanctions is "the wildest dream", it said.

Trump and Xi will hold their first face-to-face meeting on Thursday at the US president's Mar-a-Lago resort in Florida where the growing tensions on the Korean peninsula are expected to be high on the agenda.

The hardened US stance followed recent North Korean missile launches that North Korea described as practice for an attack on US bases in Japan.

In February the North simultaneously fired four ballistic missiles off its east coast, three of which fell close to Japan.

North Korea is barred under UN resolutions from carrying out ballistic missile launches or nuclear tests.