By Ju-min Park and Sohee Kim

SEOUL (Reuters) - Aides to the leaders of North and South Korea held talks at the Panmunjom truce village straddling their border on Saturday and into the early hours of Sunday, raising hopes for an end to a standoff that put the rivals on the brink of armed conflict.

The meeting at the Demilitarized Zone (DMZ) village, known for its sky-blue huts and grim-faced soldiers, began soon after the deadline for North Korea's previously set ultimatum demanding that the South halt its loudspeaker propaganda broadcasts along the border or face military action.

That deadline passed without any reported incidents.

The envoys held discussions on how to resolve recent tensions and improve ties, the South Korean presidential office said in a brief statement. The talks which began late on Saturday broke before dawn on Sunday and the envoys will resume discussions later in the day, it said.

An exchange of artillery fire on Thursday prompted calls for calm from the United Nations, the United States and the North's lone major ally, China. South Korea's military remained on high alert despite the announced talks, a defense official said.

South Korean President Park Geun-hye's national security adviser and her unification minister met with Hwang Pyong So, the top military aide to the North's leader Kim Jong Un, and Kim Yang Gon, a veteran official in inter-Korean affairs.

"The South and the North agreed to hold contact related to the ongoing situation in South-North relations," Kim Kyou-hyun, the presidential Blue House's deputy national security adviser, said earlier in a televised briefing.

Pyongyang made an initial proposal on Friday for a meeting, and Seoul made a revised proposal on Saturday seeking Hwang's attendance, Kim said.

The North's KCNA news agency also announced the meeting, referring to the South as the Republic of Korea, a rare formal recognition of its rival state, in sharp contrast to the bellicose rhetoric in recent days.

Story continues

"They need to come up with some sort of an agreement where both sides have saved face. That would be the trick," said James Kim, a research fellow at the Asan Institute for Policy Studies in Seoul.

"North Korea will probably demand that the broadcasts be cut, and they may even come to an impasse on that issue."

BRINK OF WAR?

North Korea, technically still at war with the South after their 1950-53 conflict ended in a truce, not a peace treaty, declared a "quasi-state of war" in front-line areas and on Thursday set the deadline for Seoul to halt its broadcasts.

South Korea began blasting anti-North propaganda, news reports and even entertainment over the DMZ on Aug. 10, days after landmine explosions in the DMZ wounded two South Korean soldiers. Pyongyang denies it planted the mines.

Seoul said it would continue the broadcasts unless the North accepted responsibility for the blasts.

"The situation on the Korean peninsula is now inching close to the brink of a war due to the reckless provocations made by the south Korean military war hawks," the North's KCNA news agency said earlier.

South Korean Vice Defense Minister Baek Seung-joo said on Friday Seoul expected North Korea to fire at some of the 11 sites where it has set up loudspeakers.

The United States, which has 28,500 soldiers based in South Korea, said on Friday it had resumed its annual joint military exercises there after a temporary halt to coordinate with Seoul over the shelling from North Korea.

The drills, code-named Ulchi Freedom Guardian, began on Monday and run until next Friday. North Korea regularly condemns the maneuvers as a preparation for war.

Four South Korean and four U.S. fighter jets flew in a joint sortie over the South on Saturday, a South Korean official said, as thousands of South Korean villagers living near the border were evacuated into shelters.

FAMILIAR FACES

Pyongyang's two negotiators had made an unexpected visit to the South last October to attend the closing ceremony of the Asian Games, where they met Kim Kwan-jin, Park's national security adviser, who led the South's delegation on Saturday.

North and South Korea have often exchanged threats over the years, and dozens of soldiers have been killed in clashes, yet the two sides have always pulled back from a return to all-out war. Analysts had expected the current crisis eventually to wind down.

"The fact that these powerful officials who represent South and North Korea's leaders are meeting means this is a great time to turn the crisis into opportunity," Yang Moo-jin, a professor at the University of North Korean Studies in Seoul. "It is a breakthrough."

North-South ties have been virtually frozen since the 2010 sinking of a South Korean warship. Pyongyang denies any involvement.

North Korea resumed its own broadcasts on Monday. On Thursday, it launched four shells into South Korea. The South fired 29 artillery rounds back. Neither side reported casualties or damage.

North Korea has been hit with UN and U.S. sanctions because of nuclear and missile tests, moves that Pyongyang sees as an attack on its sovereign right to defend itself.

(Additional reporting by James Pearson and Jack Kim in Seoul and David Brunnstrom in Washington; Writing by Tony Munroe; Editing by Nick Macfie and Robin Pomeroy)