TOKYO -- North Korea told Japan on Tuesday it plans to launch a satellite in the coming days, possibly a second try to put a military spy satellite into orbit three months after its first effort failed, Japanese officials said.

In late May, a North Korean rocket carrying a spy satellite plunged into the sea soon after liftoff, posing a setback to leader Kim Jong Un's push to establish a space-based surveillance system to better monitor the U.S. and South Korea. North Korea had vowed to make a second attempt after studying what went wrong with the first launch.

Japan's coast guard said North Korean authorities notified it about a plan to launch a satellite from Aug. 24 and the end of Aug. 30. Coast guard spokesperson Hiromune Kikuchi said that the notice didn't specify what type of satellite North Korea intends to launch but that he believes it possibly refers to one similar to the spy satellite in the May launch.

The North Korean notice mentioned three maritime zones that could be affected by its launch - off the Korean Peninsula's west coast, in the East China Sea and east of the Philippine island of Luzon. Japan issued safety warnings for vessels passing through the three areas, according to the website of the Japanese coast guard.

Japanese Prime Minister Fumio Kishida instructed officials to do their utmost to gather and analyze any information about the launch and to prepare for any emergencies, according to his office. He also called for cooperation with the U.S., South Korea and other concerned countries to demand North Korea not conduct the launch.

South Korea's Unification Ministry called the North's planned satellite launch 鈥渁n illegal provocation鈥 because it would violate U.N. Security Council resolutions that ban the country from committing any launch involving ballistic activities. A ministry statement said that South Korea will sternly deal with the North's launch in close coordination with the U.S. and Japan.

The launch plan comes during annual U.S.-South Korean military drills that began Monday. North Korea views the regular U.S.-South Korean military exercises as a rehearsal for invading it and is expected to extend its provocative run of missile tests in reaction to the exercises.

The 11-day Ulchi Freedom Shield drills are computer-simulated command post training. During this year's training period, the U.S. and South Korean militaries also plan more than 30 field training exercises.

On Friday, the leaders of the U.S., South Korea and Japan met for their first stand-alone trilateral summit at Camp David and agreed to increase their defence cooperation to deal with North Korea's increasing nuclear and military threats. Among the steps announced by the leaders were holding annual trilateral exercises and putting into operation by year's end the sharing of real-time missile warning data on North Korea.

North Korea's state media warned Tuesday that its rivals' drills are deepening the danger of a nuclear war on the Korean Peninsula.

鈥淚f the agreements fabricated at the Camp David Resort are additionally put into practice in the war drill ..., the possibility of outbreak of a thermonuclear war on the Korean Peninsula will become more realistic,鈥 the North's official Korean Central News Agency said.

It said the current, prevailing situation is compelling North Korea to take 鈥渙ffensive, overwhelming鈥 steps, but didn't elaborate.

On Monday, KCNA said leader Kim Jong Un had watched the test launches of strategic cruise missiles and underscored the need to bolster efforts to modernize naval weapons systems.

Since the start of 2022, North Korea has carried out more than 100 weapons tests, some of them involving nuclear-capable missiles designed to strike the U.S. mainland, South Korea and Japan. North Korea says it had no other option than to boost weapons testing activities as a response to the expansion of U.S.-South Korea military training. Washington and Seoul say their drills are defensive in nature.

South Korea's spy agency said last week that North Korea was taking steps needed for the test flights of intercontinental ballistic missiles and shorter-range nuclear-capable missiles as well as a spy satellite launch.

South Korea retrieved wreckage from North Korea's first attempt to put a spy satellite into space. South Korea's military said in July its study of the debris showed the satellite wasn't advanced enough to conduct reconnaissance from space as North Korea claimed.

Hyung-jin Kim reported from Seoul, South Korea.