North Korea represents a threat not just to Asia but to the United States, Barack Obama, the US president, has said during a brief visit to South Korea.
Obama, who met his South Korean counterpart Park Geun-hye on Friday in Seoul, warned that the two countries would respond firmly to any "provocations," according to the Reuters news agency.
In March, North Korea warned it would not rule out a "new form" of nuclear test to boost its nuclear deterrent, after the UN Security Council condemned Pyongyang's launch of a mid-range ballistic missile into the sea east of the peninsula.
Recent satellite data shows continued work at the nuclear test site in North Korea, although experts analysing the data say that preparations do not appear to have progressed far enough for an imminent test.
"When North Korea is threatening further provocations and publicly discussing the possibility of a further nuclear test, President Obama's visit to South Korea will send a firm message that North Korea's provocations will not be tolerated," Park told a joint news conference.
The two presidents were speaking after a summit in Seoul, the second stop of a four-nation Asia tour for Obama.
Al Jazeera's Harry Fawcet, reporting from Seoul, said indications that North Korea was preparing for a nuclear test had come out regularly in the past couple of weeks.
North Korea has engaged in provocative actions for the last several decades. It's been an irresponsible actor on the international stage for the last several decades
He said the South Korean defence ministry had been monitoring increased activity at the Punggye-ri nuclear test site, adding that a "detonation could perhaps be imminent".
If Pyongyang presses ahead with its fourth nuclear test it would be a clear challenge to Obama's bid to cement Washington's role as a Pacific power.
Obama offered South Korea heartfelt condolences for its "incredible loss" as the country struggles to come to terms with the sinking of a vessel packed with schoolchildren.
The two leaders bowed their heads in a moment of silence, and Obama handed Park the US flag which had flown over the White House on the day the ferry sank on April 16 as a gesture of respect from the American people.
The president's four-nation Asian tour began in Tokyo, where he urged China to rein in North Korea, saying Beijing had a "critically important" role to play in defusing tensions on the volatile peninsula.
"North Korea has engaged in provocative actions for the last several decades," he said. "It's been an irresponsible actor on the international stage for the last several decades.
"They are the most isolated country in the world. They are subject to more international sanctions and international condemnation than any country in the world."
In an interview ahead of his arrival in Seoul, Obama warned North Korea could expect a "firm response" if it made "the mistake" of conducting another nuclear test.
Pyongyang, for its part, slammed Obama's trip earlier this week as a "dangerous" move that would escalate military tension and bring the "dark clouds of a nuclear arms race" over the Korean peninsula.
Adding to the tense mix was the news that a South Korean naval vessel had fired warning shots after two North Korean patrol boats crossed the disputed maritime border on Friday. The boats quickly retreated.