SEOUL, South Korea — North Korea fired what was believed to be a submarine-launched ballistic missile off its east coast on Saturday, according to the South Korean military.

The missile flew only 19 miles, a flight too short to be called a successful launch, South Korea’s Office of Joint Chiefs of Staff said in a statement. Still, the test provided the latest evidence that North Korea was building a submarine-launched ballistic missile in defiance of a United Nations ban on the country for developing such weapons.

The United States’ North American Aerospace Defense Command also confirmed the North Korean missile launch from a submarine, saying it did not pose a threat to North America.

On Sunday, North Korea claimed that it had successfully conducted the missile test. The country’s official news agency said the test was to confirm the stability of a solid-fuel ballistic missile launched from a submarine and “the working accuracy of a nuclear detonating device of a warhead” at a designated altitude.