The U.S. is ready to negotiate with longtime adversary North Korea as it has with Iran, but Pyongyang has to be serious about abandoning nuclear weapons, President Obama said Friday. 

Obama was speaking after meeting with South Korean President Park Geun-hye, a close ally, who echoed the U.S. leader's view. 

The North has conducted three nuclear tests since 2006 and is developing a mobile ballistic missile that could potentially hit the U.S. 

Obama said Iran had been prepared to have a "serious conversation" about the possibility of giving up the pursuit of nuclear weapons. He said there's no indication of that in North Korea's case. 

"At the point where Pyongyang says, `We're interested in seeing relief from sanctions and improved relations, and we are prepared to have a serious conversation about denuclearization,' it's fair to say we'll be right there at the table," Obama told a joint news conference. 

Park's visit follows heightened tensions this summer at the heavily militarized border between the two Koreas, and speculation that North Korea could be planning another rocket launch into space or a nuclear test explosion. 

In a joint statement issued after Friday's meeting, the U.S. and South Korea said that if North Korea takes such a step, "it will face consequences, including seeking further significant measures by the UN Security Council." The statement also said they would never accept North Korea as a nuclear weapons state. 

Park has cultivated closer relations with China as she looks to coax Beijing away from its traditional embrace of Pyongyang. Last month, she prompted handwringing in Washington when she attended a Chinese military parade marking the end of World War II that was snubbed by leaders of most major democracies. 

But Obama said he had no problem with Park meeting Chinese President Xi Jinping, and joked that Xi "was in this room, eating my food," during a state visit to the U.S. last month. 

"We want South Korea to have a strong relationship with China, just as we want to have a strong relationship with China. We want to see China's peaceful rise. We want them to be cooperating with us in putting pressure on the DPRK," Obama said, referring to the North's official title, the Democratic People's Republic of Korea. 

Obama and Park discussed the often-touchy relations among China, Japan and South Korea, whose leaders are to hold a long-awaited summit in Seoul in early November. Park said that the summit will be an opportunity to improve South Korea's relations with another key U.S. ally, Japan, which would be welcomed by Washington. 

U.S. retains 28,500 troops in South Korea, a legacy of the 1950-53 Korean War, and nearly 50,000 troops in Japan. Obama called the U.S.-South Korean alliance "unbreakable." Park called it a "lynchpin" of regional security. 

In August, the two Koreas threatened each other with war after two South Korean soldiers were wounded by land mines Seoul says were planted by the North. The tensions have since eased, and the two sides have agreed to resume next week reunions of Korean families divided by the Korean War. 

The Obama administration has faced criticism from hawks and doves alike for a lack of high-level attention on North Korea, which estimated to have enough fissile material for between 10 and 16 nuclear weapons.