North Korea's pursuit of nuclear weapons — when the world is trying to rid itself of them — is "very provocative deeply concerning," U.S. Secretary of State John Kerry said Tuesday and warned that there will be consequences if it does not stop.

Kerry, who is in the Laotian capital to attend an Asia-Pacific security conference that includes North Korea, said its actions present a very serious threat not just to this region but also to international peace and security.

He said North Korea should learn from Iran, also a bitter enemy but with whom the United States and other countries made a deal to end its nuclear program.

"Iran, a powerful and well developed country with a long history of thousands of years," has decided it would not pursue nuclear weapons in order to have economic sanctions lifted, Kerry said.

"So countries can do this. But North Korea alone ... the only country in the world defying the international movement towards responsibility, continues to develop its own weapon, continues to develop its missiles, continues the provocative actions," he said.

North Korea says it needs nuclear weapons to cope with what it sees as U.S. military threats. The United States stations about 28,500 troops in South Korea and regularly holds joint military drills with South Korea. Pyongyang has long demanded Washington withdraw its troops from South Korea and stop the joint drills that it calls an invasion rehearsal.

Kerry said one of the issues that came up in nearly every meeting he had in Vientiane is the "very provocative and deeply concerning behavior of the DPRK," using the acronym for the country's formal name, the Democratic People's Republic of Korea.

Some analysts say North Korea has developed a handful of crude nuclear devices and is working toward building a warhead small enough to mount on a long-range missile capable of reaching the continental U.S. However, South Korean defense officials say the North has neither such a miniaturized warhead nor a functioning intercontinental ballistic missile

Kerry noted that U.N. Security Council in March adopted the "toughest set of sanctions in a generation" on North Korea. "But despite this and numerous other security council resolutions, the DPRK chooses to flout its international obligations," he said.

He urged the international community to fully enforce the sanctions imposed on North Korea "and we intend to do that."

"North Korea in January did another nuclear test. In February, March, April, May, continually they have done missile tests. So together we are determined, all of us assembled here -- perhaps with one exception assembled here -- to make absolutely certain the DPRK understands that there are real consequences for these actions," he said.

Asked if that exception referred to North Korea, he said unless Pyongyang has suddenly changed its position __ and he is presuming it has not — he was indeed referring to North Korea.

"The world is now talking about how we move to a world without nuclear weapons. It's hard. It's not going to happen tomorrow. But there are steps that we can take to move in that direction," he said.