A ballistic missile fired from a North Korean submarine on Wednesday flew about 310 miles, the longest distance achieved by the North for such a weapon, Seoul officials said, putting all of South Korea, and possibly parts of Japan, within its striking distance.

North Korea already has a variety of land-based missiles that can hit South Korea and Japan, including U.S. military bases in those countries. But its development of reliable submarine-launched missiles would add weapons that are harder to detect before liftoff.

South Korea's military condemned the launch as an "armed protest" by North Korea against the start of annual South Korean-U.S. military drills, but acknowledged it was an improvement over previous tests of similar missiles.

"North Korea's nuclear and missile threats are not imaginary threats any longer, but they're now becoming real threats," South Korean President Park Geun-hye said of the launch. "Those threats are coming closer each moment."

The missile, fired from a submarine off the eastern North Korean coastal town of Sinpo, reached into Japan's air defense identification zone, according to Seoul and Tokyo officials. The U.S. Strategic Command said it tracked the launch of the presumed KN-11 missile into the Sea of Japan.

Its 310-mile flight puts all of South Korea within its range if it is fired near the two countries' border.

Missiles of such capability could also potentially strike parts of Japan, including U.S. military bases on the island of Okinawa, considering the operational range of North Korea's Sinpo-class submarines, which can move about 1,000 kilometers (620 miles) underwater at a time, said analyst Kim Dong-yub at Seoul's Institute for Far Eastern Studies.

North Korea fired two missiles from submarines earlier this year, but South Korean defense officials believe they exploded in midair after flying less than 18 miles.

The launch was the latest in a series of missile, rocket and other weapon tests this year by North Korea, which is pushing to acquire reliable weapons that are capable of striking targets as far away as the continental United States.

In June, North Korea, after a string of failures, sent a midrange ballistic missile more than 870 miles high. Analysts say the flight showed North Korea has made progress in its push to be able to strike U.S. forces throughout the region.

Many outside experts say North Korea doesn't yet have a functioning long-range nuclear missile capable of reaching the continental U.S., but they acknowledge that the North has been making steady progress in its weapons programs and could one day develop such a weapon. Some civilian experts have said they believe the North already has the technology to put warheads on shorter-range missiles that could strike South Korea and Japan.

Japanese Prime Minister Shinzo Abe called the launch an "impermissible and outrageous act" that poses a grave threat to Japan. The U.S. Strategic Command statement said the launch did not pose a threat to North America, but the U.S. military "remains vigilant in the face of North Korean provocations."

The Foreign Ministry of China, North Korea's last major ally, called for all sides to avoid actions that increase tensions.

Wednesday's launch came two days after the U.S. and South Korea began their 12-day Ulchi Freedom Guardian exercises, prompting North Korean threats of retaliation for the military drills, which it views as an invasion rehearsal.

North Korea usually responds to regular South Korea-U.S. military drills with weapons tests and fiery warlike rhetoric.

The launch also comes at a time of intensified animosity between the rival Koreas over the defection of a senior North Korean diplomat in London and a U.S. plan to install a sophisticated missile defense system in South Korea.

About 28,500 U.S. troops are based in South Korea and tens of thousands of more in Japan.