HELONG, China — On a cold, clear winter day last month, a North Korean soldier packed a pistol and slipped across the frozen Tumen River into northeastern China. He trekked about a mile to the tiny village of Jidi Tun. Then at dusk he opened fire on two older couples, killing all four people.

That night, a phalanx of Chinese security forces hunted him down and shot him in the stomach. They ferried him to the hospital here in Jilin Province, about 20 miles from the scene of the killings, but the soldier died a day or so later and his body was returned to his homeland, according to local accounts.

Most likely hungry from the shortage of food that plagues some units of the armed forces in North Korea, he was looking for sustenance, local officials said; some reports said he was drunk.

In most places, a solitary killer from another country would not cause much anxiety. But in China, whose relationship with North Korea has gone from warm to frosty in the last two years, and where many citizens ridicule the young and unpredictable North Korean leader, Kim Jong-un, the government treated the episode with alarm.