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 Donald 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.

Get Breaking News Delivered to Your Inbox

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. The usual circumstances of the election and immediate transition into office meant Moon inherited several officials from Park's government, and he has moved quickly to replace them.

The nomination of Lee Nak-yon as prime minister was seen as an attempt to get more support from the southwestern liberal stronghold where Lee had served as governor and lawmaker. Lawmakers must approve Lee for the country's No. 2 job, which was largely a ceremonial post before Park's removal made current Prime Minister Hwang Kyo-ahn a government caretaker.

Moon's pick for National Intelligence Service chief is Suh Hoon, a longtime intelligence official Moon said would be the right man to push reforms at NIS, which has long been accused of meddling in domestic politics. The NIS nomination does not require lawmakers' approval, although Suh must first go through a National Assembly hearing.

Talking to reporters, Suh endorsed Moon's call for a summit meeting with North Korean ruler Kim Jong Un, although saying it would be difficult for such a meeting to take place soon, considering the tension over the North's nuclear program.

"The talk about a South-North summit is a little premature, but regardless of that, there's a need for a summit meeting," Suh said. "If conditions ripen and provide opportunities to significantly lower military tension in the Korean Peninsula and open a path toward solving the North Korean nuclear problem, which is the most urgent threat to our security, then I think (Moon) will be able to go to Pyongyang."

In his earlier speech at the National Assembly, Moon thanked the millions of South Koreans who peacefully protested for months seeking the ouster of Park, who was impeached and arrested in March and faces a trial later this month that could send her to prison for life if she is convicted. Moon also offered a message of unity to his political rivals - Moon's Democratic Party has only 120 out of 300 seats in the National Assembly, so he may need broader support while pushing his key policies.

"Politics were turbulent (in the past several months), but our people showed greatness," Moon said.

"In face of the impeachment and arrest of an incumbent president, our people opened the path toward the future for the Republic of Korea," said Moon, referring to South Korea's formal name. To his rivals, Moon said, "We are partners who must lead a new Republic of Korea. We must put the days of fierce competition behind and hold hands marching forward."

Moon began his duties earlier in the day by receiving a briefing about North Korea from Army Gen. Lee Sun-jin, chairman of South Korea's Joint Chiefs of Staff, and he visited a national cemetery in Seoul where he wrote in a visitor book: "A country worth being proud of; a strong and reliable president!"

The leaders of China, Japan and other countries sent their congratulations. South Korea's relations with Japan are strained by the Japanese military's sexual exploitation of South Korean women during World War II, and relations with China have been irritated over the THAAD anti-missile system deployment. Moon made a campaign vow to reconsider THAAD.