U.S. President Barack Obama offered his “deepest sympathies” over the deadly sinking of a South Korean ferry, having arrived in Seoul for talks on how to contain North Korea amid signs the regime is preparing a fourth nuclear test.

“As allies, but also as friends, we join you in mourning the lost and the missing,” Obama told South Korean President Park Geun Hye, referring to the April 16 sinking of the Sewol that left more than 300 passengers dead or missing, many of them schoolchildren. He presented Park with an American flag that flew over the White House the day of the sinking.

Park said that like U.S. citizens in the wake of the 9/11 terrorist attacks, the South Korean people would bounce back.

The visit by Obama is the second leg of his four-country Asian tour, and his focus for Seoul will be on North Korea. Ending the regime’s nuclear ambitions is a centerpiece of U.S. policy in Asia, and Obama has insisted North Korean leader Kim Jong Un renounce his nuclear program before international talks can resume that could reward the North with aid. The South warned this week the North is stepping up preparation for a nuclear test that could coincide with Obama’s two-day visit.

“Boosting activity at the nuclear test site before Obama’s visit is part of North Korea’s strategy to win the spotlight,” Yang Moo Jin, a professor at the University of North Korean Studies in Seoul, said by phone. “It gets Obama’s attention and pressures him into taking a softer line on North Korea.”

Deterrent

The North says its program is a deterrent against a U.S.- led invasion, and last month fired dozens of missiles, some capable of reaching as far as Japan, where Obama visited before Seoul.

Before his meeting with Park, Obama visited a national war memorial where he took part in a wreath laying to honor the dead, including the more than 33,000 Americans killed in the 1950-1953 Korean War. He also toured Gyeongbokgung palace, which was first constructed in 1395, three years after the founding of Korea’s last dynasty and sits in front of the presidential palace.

South Korean Defense Ministry officials said this week that activity at North Korea’s underground test site at Punggye-ri signaled it may soon detonate a device, while recognizing the possibility the North may be bluffing. Commercial satellite imagery taken April 23 shows movement of vehicles and materials “probably related to preparations for a detonation,” said 38 North, a blog run by the U.S.-Korea Institute at the Johns Hopkins School of Advanced International Studies.

Calling China

Park spoke by phone with Chinese President Xi Jinping on April 23 and urged him to dissuade the North from any test, while Obama yesterday said China was “critically important” in helping rein the North in. A Foreign Ministry official warned North Korea that Chinese aid to the country may be affected if it carried out another test, the Asahi newspaper reported today, citing an unidentified Chinese official.

North Korea should “expect a firm response from the international community,” if it carries out another test, Obama said in a written response to questions in the JoongAng Ilbo newspaper. North Korea’s failure to give up its nuclear program “coupled with its provocative actions, especially against South Korea, is the reason why Pyongyang is more isolated than ever,” Obama wrote.

North Korea’s access to cheap rockets provides a near- unlimited potential for saber rattling as it seeks to wring concessions out of the international community for any steps toward disarmament. The country fired nearly 90 projectiles from late February to late March, coinciding with annual U.S.-South Korea military drills it has labeled a “dress rehearsal” for invasion.

‘Bargaining Power’

“Launches fall in step with North Korea’s long-term pursuit of greater food and energy assistance through increased bargaining power,” said Kim Yong Hyun, a professor of North Korean studies at Seoul’s Dongguk University. “It’s about gaining the upper hand ahead of negotiations by relying on what it has comparative advantage in.”

The visit to Korea and Japan comes one month after Obama arranged a three-way summit in The Hague with President Park and Prime Minister Shinzo Abe of Japan in an effort to mend ties between the two leaders. The U.S. is seeking to unite its allies to help counter China’s assertiveness and North Korea’s nuclear ambitions.

“What we’ve seen is good progress in this area since the trilateral meeting in The Hague,” Ben Rhodes, Obama’s deputy national security adviser, told reporters aboard Air Force One on the way to Seoul. “There’s a sincere willingness on both sides to build out that cooperation.”

Coordinated Effort

Park had previously rejected offers for direct talks, saying Abe’s administration has sought to deny atrocities committed during Japan’s 1910-1945 occupation of Korea, including the Imperial Army’s use of sex slaves. Park eased her stance after Abe told parliament on March 14 he wouldn’t revise Japan’s 1993 apology for the military’s abuse of so-called comfort women.

Obama said a coordinated effort between Japan, South Korea and China would allow for the application of “more and more pressure on North Korea so that at some juncture they end up taking a different course.”