SEOUL, South Korea — South Korea confirmed on Wednesday that it had been in talks with American and North Korean officials about negotiating a peace treaty to formally end the Korean War after more than 60 years, as the United States and its ally try to establish a basis for persuading the North to give up its nuclear weapons.

Chung Eui-yong, the national security adviser to President Moon Jae-in of South Korea, said he had discussed the matter with John R. Bolton, his newly appointed American counterpart, in Washington last week, as they prepared for the planned talks between each of their countries’ presidents and Kim Jong-un, North Korea’s leader. South Korean officials said they had also been in talks with the North about a possible treaty.

Mr. Kim told Mr. Chung and another South Korean official last month that the North was willing to give up nuclear arms if it received security guarantees. In the past, the North has said that a peace treaty and the normalization of ties with the United States would be among the security guarantees it would require in exchange for surrendering its nuclear program.

Referring to his meetings with Trump administration officials, Mr. Chung said on Wednesday, “We held in-depth discussions on various ways of how to end hostilities and eventually establish a peace regime on the Korean Peninsula, how to address the North Korean concerns and how to ensure a bright future for the North if it makes the right choice.”