SEOUL, South Korea — New South Korean President Moon Jae-in said as he took office Wednesday that he is open to visiting rival North Korea under the right conditions to talk about its aggressive pursuit of nuclear-tipped missiles.

Moon’s softer stance on North Korea could create friction with Washington, which has swung from threats of military action to hints of dialogue as it seeks to formulate a policy under President Trump.

South Korea’s first liberal leader in a decade, Moon also said he’ll “sincerely negotiate” with the United States, Seoul’s top ally, and China, South Korea’s top trading partner, over the contentious deployment of an advanced U.S. missile-defense system in southern South Korea. The system has angered Beijing, which says its powerful radars allow Washington to spy on its own military operations.

In a speech at the National Assembly, Moon pledged to work for peace on the Korean Peninsula amid growing worry over the North’s expanding nuclear weapons and missiles program.

“I will quickly move to solve the crisis in national security. I am willing to go anywhere for the peace of the Korean Peninsula – if needed, I will fly immediately to Washington. I will go to Beijing and I will go to Tokyo. If the conditions shape up, I will go to Pyongyang,” Moon said.

Moon assumed presidential duties early in the morning after the National Election Commission finished counting Tuesday’s votes and declared him winner of the special election necessitated by the ousting of conservative Park Geun-hye, whose downfall and jailing on corruption charges is one of the most turbulent stretches in the nation’s recent political history.

At his first news conference at the presidential Blue House, Moon introduced his nominees for prime minister, the country’s spy chief and his presidential chief of staff.