SEOUL, South Korea — On Oct. 24, 1995, as a man now known as Kim Dong-sik hiked up a rain-slick mountain road in Buyeo, about 95 miles south of Seoul, he could not shake off a foreboding. He and another North Korean agent had sneaked into South Korea by boat 52 days earlier on a mission to bring home a Communist spy who had been working in the South for 15 years. The latest message from their superiors said the spy had been instructed to wait for Mr. Kim in a temple in Buyeo, disguised as a Buddhist monk named Jawoon.

But there was no monk.

“Instead, there was an old man in faded jeans, who said he was convalescing there,” Mr. Kim, 51, said in an interview in a Seoul coffee shop last month. “I didn’t find out until much later that the man was actually one of several South Korean counterespionage officials waiting to trap me. When I asked him about Jawoon, he said the monk was tending a garden down the hill. I knew something was wrong.”

He ran to his colleague and told him they had to get out fast. A car came up behind them. The driver, in a monk’s robe, slowed down and asked the North Koreans if they needed a ride. When they declined, he drove on a few yards, but then stopped and got out, pretending to check a tire. Then he turned, whipped out a pistol and shouted, “Hands up!”

Mr. Kim considered his options: swallow cyanide or resist capture. He pulled out his pistol. With the first shots, the road behind him filled with South Korean agents. The pair shot their way out and fled up the mountain behind the temple.