South Korea and Japan have agreed to hold more talks over a chain of disputed islands which have threatened to create a diplomatic stand-off.
Japan's Vice Foreign Minister Shotaro Yachi welcomed more talks
South Korea vowed to use force if Japan carried out a survey of the islands.
"We have reached a three-point agreement for a diplomatic settlement," South Korean Vice Foreign Minister Yu Myung-hwan told reporters.
More talks will take place in May, after Japan said it would cancel its proposed maritime survey.
The islands are known as Dokdo in Korea and Takeshima in Japan.
Japanese Vice Foreign Minister Shotaro Yachi told Japan's Jiji news agency: "If this problem would continue unresolved, some unanticipated contingency could have occurred, but it was good that we could avoid it."
The two countries agreed the latest dispute arose because of ill-defined maritime boundaries between the two countries.
"The two countries agreed to resume talks on drawing the borders of their exclusive economic zone at an early date," he added.
On Friday, Mr Yu had said no progress had been made in two days of talks.
Known as Dokdo (Solitary islands) in Korea, Takeshima (Bamboo islands) in Japan
Also known as Liancourt rocks
Japan's and South Korea's claims go back centuries, but islands occupied by S Korea since 1953
Just 230,000 sq m in size, with no fresh water
But surrounding waters valuable for their fishing
South Korea sent about 20 gunboats to the islands, where Japanese survey boats were awaiting orders to begin the survey.
Both countries claim the uninhabited islands, which have been controlled by South Korea for decades.
But the row also reflects unresolved tensions stemming from Japan's 1910-45 occupation of the Korean peninsula.
Nearly 100 Japanese lawmakers also visited the controversial Yakusuni shrine to Japan's war dead on Friday, in a move likely to further stoke tensions.
Ahead of the talks on Friday, a small group of Korean protesters burned the Japanese flag and chanted anti-Japanese slogans outside Tokyo's embassy. "Japan has again caught the disease of aggression," one placard said.
"We need to talk more. The positions of the two sides are so different... that we have to talk frankly."
Mr Yachi told reporters: "The mood on both the Japanese and South Korean sides was very stern. We will continue discussions."
Japan's actions have sparked an emotional response from Seoul
Tokyo decided to conduct the survey after South Korea announced it would register Korean names for seabed features around the disputed islands at an international oceanographic meeting in June.
Japan says it needs to carry out the survey in order to submit a counter-proposal, but offered to call it off if South Korea withdrew its name registration plans - something Seoul refused to countenance.
Mr Yu had insisted South Korea would prevent the survey from going ahead "even if it means mobilising physical force". Japanese Foreign Minister Taro Aso on Friday warned any interference with the boats would "clearly violate the principles of international law".
The dispute over the islands is a recurring flashpoint in relations between the two countries. The islands sit among rich fishing grounds and the area may also contain gas deposits.