The rivals agreed to "defuse the current military tension and to hold military talks to address the issue", according to a joint statement.
The two Koreas have taken steps towards reducing tensions during rare talks, as North Korea agreed to send a delegation to next month's Winter Olympics in South Korea, hold talks on reducing tension along their border and re-open a military hotline.
The meeting, the first of its kind in about two years, was arranged after North Korean leader Kim Jong-un pushed for improved ties with South Korea following elevated tensions with the outside world over his expanding nuclear and missile programs.
"I think we took an important first step toward the development of South-North relations," chief South Korean delegate Cho Myoung-gyon said after talks at the border village of Panmunjomue.
Cho's North Korean counterpart, Ri Son Gwon, read a joint statement in which the two Koreas agreed to "actively cooperate" in the Pyeongchang Olympics to "enhance the prestige of the Korean people."
He said North Korea will send a delegation of officials and athletes and South Korea will provide necessary services for the delegation.
"I believe that North Korea's participation in the Pyeongchang Games will provide us with a chance to reduce tension on the Korean Peninsula," said Cho, whose official title is unification minister.
North Korea also agreed to hold military talks with South Korea aimed at reducing animosity along their tense border and to restore a military hotline communication channel, according to Cho and Ri.
All major inter-Korean communication channels had been shut down amid animosity over the North's nuclear program in recent years.
Cho said South Korea also called for talks at an early date on de-nuclearisation of the Korean Peninsula to promote peace. He said the two Koreas would continue high-level talks but didn't say when the next meeting would take place.
An agreement on the North's Olympic participation had been widely expected before the talks began, with the country's delegates expected to demand rewards in return for South Korea's proposal of family reunions, such as a halt to South Korean propaganda broadcasts and a scaling back or halting of military drills with the US.
It wasn't immediately clear whether the North made such a demand.
The US State Department welcomed Tuesday's meeting between the two Koreas and said it would work with Seoul to ensure North Korea's participation does not violate UN sanctions.