PYONGYANG, North Korea — North Korea marked its “Military First” holiday on Thursday with mass dancing, outdoor concerts and boasts of a successful — and potentially game-changing — submarine-launched ballistic missile test it hopes will serve as a warning to Washington and Seoul to stop holding joint military exercises Pyongyang sees as a dress rehearsal for invasion.

Television news broadcasts and the front pages of morning newspapers Thursday showed images of the launch, conducted in the early hours the day before. The test, which brought immediate condemnation from the United States and North Korea’s neighbors, sent a “Pukguksong” missile soaring from a submerged position off the North’s port city of Sinpo. It flew an estimated 500 kilometers (310 miles) toward the seas around Japan, the longest distance North Korea has yet achieved in a submarine launch.

Kim was shown smiling and hugging officials after watching the test from an observation deck. He was quoted by state media as calling it the “success of all successes.”

Launching long-range ballistic missiles from submarines is stealthier than land launching. Having that capability could significantly strengthen North Korea’s ability to conduct strikes on U.S. positions in South Korea, and possibly on U.S. bases in Japan as well.

The North has attempted two such launches before, but neither was seen as successful by outside experts.

As the news of the missile test was broadcast on a large screen outside Pyongyang’s main train station Thursday, dozens of people stood in the rain to watch.

“This shows that our national defense strength has reached a new level,” said Choe Kum Chol, a 42-year-old factory worker. “We are a nuclear power and everything is ready, so we have nothing to fear.”

The test came as the U.S. and South Korea are conducting their annual, 12-day Ulchi Freedom Guardian exercises south of the Demilitarized Zone.

Though North Korea has protested such exercises for decades, prompting regular spikes in tensions on the divided peninsula, it has been particularly alarmed by reports that the maneuvers have recently started to include training for an invasion of the North and precision strikes, or “beheading operations,” against its top leaders.

North Korea’s missile and nuclear weapons development programs have brought heavy international sanctions down on its head, but it says they are justified because of the threat posed by the U.S. and South Korea.

“They are not military exercises, but war preparations to invade our country,” said Kim Kyong Ik, a 44-year-old Pyongyang resident. “Our country is getting more prosperous and they don’t like that, so they are stepping up their moves to stifle us.”

He said South Korea should “wake up and kick the Americans out.”

The United Nations Security Council agreed at an emergency meeting late Wednesday requested by the United States and Japan to consider issuing a statement on the missile launch.

Malaysian counselor Johan Ariff Abd Razak, whose country holds the council presidency, said Thursday the United States circulated a draft statement to members and China asked for more time to consider it.

Peter Wilson, Britain’s deputy U.N. ambassador, said this was the fourth missile launch where “something has not been agreed” to by the Security Council in response. “We want to see a press statement agreed,” he said.

Diplomats say China, which has close ties to North Korea, has blocked council action or insisted on changes in previous proposed texts that were unacceptable to other members.

State Department spokeswoman Elizabeth Trudeau said in a statement that the U.S. strongly condemned the launch and called on North Korea to “refrain from actions and rhetoric that further raise tensions in the region.” She said the missile launch marked the latest in an “accelerating campaign” of missile tests that violate multiple U.N. Security Council resolutions.

South Korea’s military condemned the launch but acknowledged it was an improvement over previous tests of similar missiles.

Washington and Seoul say the military exercises North Korea opposes are defensive in nature.

Thursday marks the anniversary of the “Military First” policy initiated by Kim Jong Un’s father, the late Kim Jong Il, and the priority position the military continues to enjoy in North Korea was on full display.

Mass dancing demonstrations — a holiday staple in North Korea — were to be held on Kim Il Sung Square and other places around the country. Though the atmosphere in Pyongyang was more festive than tense, convoys carrying troops to various gatherings have been speeding through the broad avenues of the capital all week.

Television air time has been dominated by military footage even more than usual, with soldiers seen advancing through chest-deep mud, braving ice-covered lakes and staging fight scenes featuring taekwondo moves atop a moving train.

North Korea is one of the most militarized countries in the world, with a million-man army in a nation of only 25 million people.

Military service is mandatory — along with being long and arduous — and maintaining such a large number of troops is a major draw on the North’s very limited economic resources. Its nuclear program is also costly, especially given the sanctions that result.

North Korean strategists believe that developing nuclear weapons and a reliable arsenal of long-range missiles is necessary and, in the end, a more cost-effective means of keeping Washington at bay and the ruling regime secure than maintaining a large conventional army.

Despite the price they pay in sanctions, officials sometimes cite the example of Libya, and the killing of strongman Moammar Gadhafi, as what happens to leaders who cave in to international pressure to give up their nuclear ambitions.

North Koreans are also quick to point out that, although their country has received military assistance in the past from the Soviet Union and China, which helped it stave off the U.S. during the 1950-53 Korean War, it no longer has any foreign troops based on its soil.

There are about 28,000 U.S. troops based in South Korea, and tens of thousands more in Japan, including the U.S. 7th Fleet and two major fighter bases that could be used as staging areas for attacks on the North if hostilities broke out.