North and South Korea agreed at high-level military talks Thursday to restore their military communication lines in the Sea of Japan and Yellow Sea areas, according to a joint statement.

The statement, issued after the daylong meeting of general-rank officers in Panmunjeom, said the two sides also exchanged opinions about demilitarizing the Joint Security Area at Panmunjeom to ease tensions.

The meeting at Tongilgak, a building on the North Korean side of Panmunjeom, was the first of its kind between the two Koreas since December 2007.

The five-member South Korean delegation was led by Maj. Gen. Kim Do Gyun, with the five-member North Korean delegation represented by Lt. Gen. An Ik San.

The talks were originally scheduled for May based on an agreement reached at the summit between South Korean President Moon Jae In and North Korean leader Kim Jong Un at Panmunjeom on April 27.

But they were effectively postponed when North Korea, angered at a U.S.-South Korean joint air exercise, put off a high-level inter-Korean meeting indefinitely on May 16, the very day it was scheduled to be held.

It was only at a rescheduled high-level meeting on June 1 that the two Koreas agreed to hold the military talks on Thursday.

"I feel so grateful to be sitting here with the South Korean delegation to talk about military issues at a time when the whole nation is putting huge efforts into moving toward peace and prosperity," An said at the outset of the talks.

The South's Kim said he expected to have fruitful results as delegates from the two Koreas seem eager to reach an agreement on military issues on the agenda.

In the so-called Panmunjeom Declaration issued at the inter-Korean summit, North and South Korea agreed to work to ease military tension and "practically eliminate the danger of war" on the divided peninsula.

As part of the arrangement, the two Koreas agreed to hold frequent meetings between military authorities, including between their defense ministers, to "immediately discuss and solve military issues that arise between them."

It was not immediately known whether the suspension of joint military exercises between the United States and South Korea was discussed.

At a news conference shortly after his summit with Kim Jong Un in Singapore on Tuesday, U.S. President Donald Trump said the United States will be stopping the exercises, which he called "very provocative," so long as denuclearization talks with North Korea continue.

North Korea has long regarded the joint military exercises as a rehearsal for invasion.