SEOUL - North Korea and the United States have agreed to resume suspended four-way talks to replace the tattered Korean War armistice with a permanent peace accord, South Korea's Yonhap news agency said on Sunday.

The two countries agreed on a path toward resuming the peace talks when U.S. special envoy Stephen Bosworth visited North last week, Yonhap quoted South Korean government officials as saying.

I believe the two sides agreed on resuming the four-party peace talks once an official agreement has been made on reviving the denuclearization talks, a South Korean government official told Yonhap, asking not to be named due to the sensitivity of the issue.

It was North Korea that first requested the matter be discussed within the four-party framework, Yonhap quoted the official as saying.

On Friday, Pyongyang hinted after the talks with Bosworth that it could end its year-long boycott of the six-party negotiations over its nuclear program.

The truce that ended the 1950-53 Korea war has left the two Koreas in a technical state of war. Talks among the four main combatants in the Korean War -- the two Koreas, the United States and China -- were suspended in 1999 after making little progress.

(Reporting by Cheon Jong-woo; Editing by Bill Tarrant)