SEOUL, South Korea — North and South Korean troops began removing some of the land mines planted at their heavily fortified border Monday, Seoul officials said, in the first implementation of recent agreements aimed at easing their decades-long military standoff.

The demining comes amid resumed diplomacy over North Korea’s nuclear weapons program after weeks of stalemated negotiations. Secretary of State Mike Pompeo is to visit Pyongyang, North Korea’s capital, this month to try to set up a second summit between President Trump and North Korean leader Kim Jong Un.

On Monday, South Korean army engineers with demining equipment were deployed to the border village of Panmunjom and another frontline area called “Arrow Head Hill” where the Koreas plan their first joint searches for soldiers killed during the 1950-53 Korean War.

The troops began removing mines on the southern part of the two sites. Later Monday, the South Korean military detected North Korean soldiers engaged in what it believed was demining on the northern part of the sites, a South Korean defense official said.

At Arrow Head Hill, where some of the fiercest battles occurred during the Korean War, Seoul officials believe there are remains of about 300 South Korean and U.N. forces, along with an unspecified number of Chinese and North Korean remains.

The Korean War left millions dead or missing, and South Korea wants to expand joint excavations with North Korea for remains at Demilitarized Zone areas. The Koreas remain split along the 155-mile-long DMZ that was originally created as a buffer zone at the end of the Korean War. About 2 million mines are believed to be scattered in and near the DMZ, which is also guarded by hundreds of thousands of combat troops, barbed wire fences and tank traps.

Mines dislodged by flooding and landslides have occasionally caused deaths in front-line areas in South Korea. In 2015, a land mine blast blamed on North Korea maimed two South Korean soldiers.