Pyongyang has made putting a spy satellite into orbit a priority of its military modernisation programme.
The launch took place in the early hours of Thursday morning, the first day of a week-long launch window, but failed because of a problem with the third stage of the rocket carrying the satellite, North Korea said.
It said it would try again in October.
“The flights of the first and second stages of the rocket were normal, but the launch failed due to an error in the emergency blasting system during the third-stage flight,” state-run KCNA said of Thursday’s attempt.
South Korea’s military said it detected the launch from the Sohae Satellite Launching Station at about 3:50 am local time (18:50 GMT on Wednesday) and tracked the rocket as it “traversed international airspace” over the Yellow Sea.
About 10 minutes later, residents of Japan’s southernmost prefecture of Okinawa received emergency warnings advising them to take cover indoors. The emergency warning was lifted after about 20 minutes.
Some of the debris may have landed in the Pacific, near the Philippines, according to Japanese broadcaster NHK.
A spy satellite is a priority of North Korean leader Kim Jong Un’s plan to modernise the country’s military and develop cutting-edge weapons.
The first launch attempt in May also ended in disaster with officials calling it their “gravest failure” and promising to try again.
In a televised press conference, Japanese Chief Cabinet Secretary Hirokazu Matsuno said the repeated missile launches were a threat to regional security.
“We will strongly protest against North Korea and condemn it in the strongest possible terms,” he said.
South Korea’s National Security Council also condemned the launch, saying it breached United Nations Security Council resolutions banning Pyongyang’s use of ballistic missile technology.
The United States also said the launch violated UN resolutions and urged North Korea to refrain from “further threatening activity”, calling on Pyongyang to engage in serious diplomacy.
“Space launch vehicles [SLVs] incorporate technologies that are identical to, and interchangeable with, those used in ballistic missiles, including intercontinental ballistic missiles [ICBMs],” a state department spokesperson said in a statement.
The launch came days after the leaders of South Korea, Japan and the US met in Washington, DC, and as US and South Korean forces conduct their annual Ulchi Freedom Shield military exercises.
North Korea claims such drills are a rehearsal for war.