South Korea recalled its ambassador to Ukraine on Thursday after a dispute over North Korean prisoners of war. President Lee Jae Myung said Kyiv broke a confidentiality agreement by revealing their defections. Mr. Lee said, "If they continue to refuse to acknowledge the facts, we will take additional measures."

President Zelensky revealed last month that two POWs defected to South Korea. South Korea accused him of breaking a confidentiality agreement.

South Korea announced on Thursday that it will recall its ambassador to Ukraine, deepening a diplomatic rift sparked last month when President Volodymyr Zelensky of Ukraine revealed his government had sent two North Korean prisoners of war to Seoul.

The government of President Lee Jae Myung of South Korea was caught off guard by the disclosure of the defections, which Mr. Zelensky made during a speech at the United Nations General Assembly. The two North Koreans were among the thousands from their country who had been fighting for Russia in its war against Ukraine.

Mr. Lee, whose domestic critics have accused him of trying to keep the move secret to protect efforts to improve ties with Pyongyang, immediately expressed displeasure.

He said that Seoul and Kyiv had mutually agreed to keep the soldiers' defections confidential to help ensure their safety, along with that of their families in North Korea. He accused Kyiv of breaking a bilateral confidentiality agreement, calling the move "regrettable." Kyiv has said that no agreement existed.

A diplomatic tit-for-tat ensued. In interviews published by Ukrainian media outlets last week, the country's foreign minister, Andrii Sybiha, sought to defuse the situation, calling it a "diplomatic misunderstanding." The characterization only fueled Mr. Lee's frustration.

"When the South Korean president expressed regret with the utmost courtesy, they claimed there was no agreement, making the head of state of another country out to be a liar," Mr. Lee said. "If they continue to refuse to acknowledge the facts and issue a public apology, we will take additional measures."

Testifying before the National Assembly on Tuesday, the South Korean foreign minister, Cho Hyun, said the response South Korea had received from Mr. Sybiha fell short of the apology it had demanded. Mr. Cho warned of a "resolute step."

He didn't elaborate. But on Thursday, South Korea followed through on its warning by recalling its ambassador to Ukraine, Park Ki-chang.

"The government hopes for an amicable resolution to the pending issue between the two countries and will continue consultations with the Ukrainian side," the South Korean Foreign Ministry said in an official statement.

Recalling an ambassador represents a severe diplomatic expression of discontent. South Korea last took such action in 2008, when it summoned home its ambassador to Japan over a territorial dispute.

The two North Korean soldiers were captured in January of last year while fighting in the Kursk region of Russia. Seoul and Kyiv subsequently engaged in secret negotiations over the fate of the two men, who expressed a desire to defect to South Korea. Under its Constitution, South Korea recognizes all North Koreans as its citizens and maintains a legal obligation to accept defectors and refugees from the North.

Following Mr. Zelensky's disclosure, South Korean lawmakers confirmed the soldiers had arrived in Seoul in the middle of last month.

South Korea has consistently denounced Russia's invasion of Ukraine, providing Kyiv with medical supplies, financial aid, and nonlethal military equipment like helmets and demining gear. Mr. Zelensky has repeatedly urged Seoul to do more, asking for missiles and other South Korean weapons, but South Korea has declined, citing its longstanding policy against supplying lethal weapons to countries at war.