Updated

North and South Korea agreed Wednesday to reopen their Kaesong joint industrial park on a trial basis from next Monday, five months after it was shut during soaring military tensions.

The setting of a date came after a marathon negotiating session that ran through the night, and marks a tangible step forward for recent efforts to improve cross-border relations.

"The institutional foundation has now been laid for Kaesong to develop into an internationally competitive and stable industrial complex," the South's Unification Ministry said in a statement.

The two sides agreed that operations at the South-funded complex that lies 10 kilometres (six miles) over the border in North Korea would "resume on a trial basis from September 16," it said.

Born out of the "sunshine" reconciliation policy initiated in the late 1990s by then-South Korean president Kim Dae-Jung, Kaesong was established in 2004 as a rare symbol of inter-Korean cooperation.

It provided an important hard currency source for the impoverished North through taxes, other revenues, and its cut of workers' wages.

It had appeared immune to previous downward spirals in North-South relations, but finally fell victim to two months of intense military tensions that followed the North's nuclear test in February.

Pyongyang initially barred South Korean entry to the park in early April and shortly afterwards withdrew its entire 53,000-strong workforce -- effectively closing down the complex which houses production lines for 123 South Korean firms.

Each side blamed the other, with the North insisting its hand was forced by hostile South Korean actions -- in particular, a series of joint military exercises with the United States.

As military tensions eased, the two Koreas agreed last month to work together to resume operations at the zone.

As part of the deal, the North accepted the South's demand that Kaesong be opened to foreign investors -- a move seen by Seoul as a guarantee against the North shutting the complex down again in the future.

Wednesday's agreement, which followed talks that began Tuesday morning and continued through the night, includes plans to host a road show for foreign investors at Kaesong in October.

Seoul had pushed for compensation for the companies hit by the closure, and the two sides appeared to reach a compromise -- agreeing to waive taxes for the firms this year.

Pyongyang's official Korean Central News Agency confirmed an agreement had been reached but offered no details beyond the September 16 re-opening date.

Analysts stressed that Kaesong would remain a vulnerable project whatever safeguards are reached.

"This agreement offers no real guarantee that Kaesong will be insulated from political upheavals and military tensions in the future," said Yang Moon-Jin, a professor at the University of North Korean Studies in Seoul.

"Even the 1953 armistice is easily violated -- that's the reality on the Korean peninsula," Yang said.

Once Kaesong is reopened, observers say Pyongyang is likely to step up pressure on Seoul to revive another cross-border project -- South Korean tours to the North's Mount Kumgang resort.

The South suspended the tours -- another important source of hard currency for the North -- after a North Korean soldier in 2008 shot dead a female tourist from the South who strayed into a restricted zone.

In response, Pyongyang scrapped a deal with the resort's developer -- Seoul's Hyundai Asan company -- and seized its properties there.

Seoul has agreed to discuss resuming the Kumgang tours but has delayed the date for talks to begin.

In the meantime, Kumgang will play host at the end of this month to the first reunion in three years of family members separated by the 1950-53 Korean War.