SEOUL, South Korea — Secretary of State Mike Pompeo and North Korean leader Kim Jong Un agreed to arrange a second summit "as soon as possible," and discussed potential U.S. inspections of North Korean nuclear sites, South Korea's presidential office said on Sunday.

South Korea's President Moon Jae-in held talks with Pompeo in Seoul after the top U.S. diplomat met with Kim for more than three hours during a short trip to Pyongyang that was aimed at breaking a gridlock in their nuclear talks.

Shortly after arriving in South Korea following the visit, Pompeo posted a photo of himself walking along with Kim on Twitter, saying he "Had a good trip" and that the two countries "continue to make progress."

Pompeo told Moon that he and Kim discussed denuclearization steps to be taken by the North and the issue of U.S. government inspection of those actions, which Washington has been calling for, as well as the measures the United States would conduct in return, according to Moon's press secretary Yoon Young-chan.

Pompeo and Kim also agreed to form a working group "at an early date" to discuss the denuclearization process and the second summit, which Kim proposed to President Donald Trump in a letter last month, Yoon said.

"Secretary Pompeo said he and Chairman Kim concurred that they will hold the second U.S.-North Korea summit as soon as possible," Yoon said in a statement.

"The two sides also agreed to continue discussions to decide on the detailed timing and location of the second summit."

While Seoul sounded upbeat, Pompeo struck a more cautious tone.

He said his latest, fourth trip to the North was "another step forward" to denuclearization and he had a "good, productive conversation" with Kim, but more needed to be done.

"As President Trump said, there are many steps along the way and we took one of them today," Pompeo told Moon. "It was another step forward. So this is, I think, a good outcome for all of us."

Moon expressed hopes that Pompeo's trip and the proposed second meeting between Kim and Trump would make "irreversible, decisive progress in terms of denuclearization as well as the peace process."

Kim and Pompeo met for about two hours, and then had lunch together at the Paekhwawon, or 100 Flowers Garden, a prestigious state guesthouse, for another hour and a half, according to a pool report.

"It's a very nice day that promises a good future for both countries," Kim said, speaking through an interpreter, as he sat down at the lunch table with Pompeo.

"Thank you for hosting, President Trump sends his regards. And we had a very successful morning, so thank you and I am looking forward to our time here at lunch as well," Pompeo said.

Kim pledged to work toward denuclearization at his unprecedented meeting with Trump in Singapore in June, but Pyongyang's actions have since fallen short of Washington's demands for irreversible steps to give up its arsenal, including declaring all nuclear and missile facilities.

A U.S. official who was part of Pompeo's delegation said the latest visit to the North was "better than the last time" but added: "It's going to be a long haul."

Pompeo's last trip did not go well. He left Pyongyang in July hailing progress, only for North Korea to denounce him for making "gangster-like demands." Pompeo did not meet Kim on that trip.

In Seoul, Pompeo was scheduled to meet South Korean President Moon Jae-in later on Sunday before holding talks with Foreign Minister Kang Kyung-wha, according to Moon's office.

Pompeo visited Tokyo on Friday and is also due to travel to Beijing before returning home on Monday.