North Korea fired a deadly barrage of artillery shells onto a South Korean island on Tuesday in one of the most serious border incidents since the 1950-53 war, inciting global condemnation.
South Korea's military went on top alert, its troops fired back with cannon and the government met in an underground war room, officials said, in response to what Seoul called an atrocity against civilians.
North Korea's supreme command, however, accused South Korea of firing first and vowed "merciless military attacks with no hesitation if the South Korean enemy dares to invade our sea territory by 0.001 mm".
But condemnation of Pyongyang poured in from the United States, which has 28,500 troops in South Korea, along with Russia, Japan and Western Europe. The UN Security Council was to meet in emergency session, a French diplomat said.
China North Korea's sole major ally and economic prop urged restraint, and called for the resumption of stalled six-nation talks aimed at dismantling Pyongyang's nuclear drive.
The firing came after North Korea's disclosure of an apparently operational uranium enrichment plant a second potential way of building a nuclear bomb which is causing serious alarm for the United States and its allies.
It also comes as North Korea prepares for an eventual dynastic succession from Kim Jong-Il to his youngest son, Kim Jong-Un. The expected transfer is fuelling speculation about the opaque regime's military and nuclear intentions.
The White House said it "strongly condemns" the artillery attack on the border island of Yeonpyeong and was "firmly committed to the defense" of South Korea.
Stephen Bosworth, the US special envoy on North Korea, who was on a visit to Beijing, described the incident as "very undesirable".
South Korean General Lee Hong-Ki accused Pyongyang of a "pre-planned" attack and an "inhumane atrocity that fired random shells towards residential areas of defenseless civilians".
Some 50 shells landed on Yeonpyeong near the tense Yellow Sea border, damaging dozens of houses and sending plumes of thick smoke into the air, YTN television reported.
Two South Korean marines part of a contingent based permanently on the frontline island were killed, the military said.
Another 15 marines were wounded along with three civilians, officials said. They said South Korean forces fired 80 rounds back from K-9 self-propelled guns on Yeonpyeong.
Since the shelling was aimed at the island's military base, there were many casualties among soldiers, one marine said.
"A Class-A military alert issued for battle situations was imposed immediately after shelling began," a military spokesman told AFP.
Sporadic firing by each side continued for over an hour before dying out, the military said.
The shelling began at 2:34 pm (0534 GMT) after the North sent several messages protesting about South Korean exercises being staged south of the border, a presidential spokesman said.
"Flashes along with a thunderous sound were seen here and there across our villages and up to 10 houses were engulfed in flames," said Woo Soo-Woo, 62, who fled to the mainland by ferry along with scores of other islanders.
Yeonpyeong lies just south of the border declared by UN forces after the war, but north of the sea border declared by Pyongyang. The Yellow Sea border was the scene of deadly naval clashes in 1999, 2002 and last November.
Tensions have been acute since the sinking of a South Korean warship in March, which Seoul says was the result of a North Korean torpedo attack. Pyongyang has rejected the charge.
South Korean President Lee Myung-Bak convened an emergency meeting of ministers and national security advisers in an underground war room.
His office warned that South Korea would "sternly retaliate" for any further provocations.
"As the North is still in an attack position, further provocation seems to be possible and our military should be prepared to retaliate with manifold firepower," a spokesman quoted Lee as saying during a visit to the main military command post.
"It is unpardonable for the North to attack civilian targets."
Inter-Korean talks scheduled for Thursday, aimed at arranging further reunions of families separated by the war, were shelved.
Professor Kim Yong-Hyun of South Korea's Dongguk University said North Korea had staged an "intentional provocation to heighten cross-border tensions" and to unify its people during the leadership succession.
"It is also sending a strong message to the United States and the international community that the peninsula urgently needs a peace regime," to replace the uneasy 1953 armistice and win Pyongyang more legitimacy, he said.
While others around the world lashed out at North Korea, Chinese foreign ministry spokesman Hong Lei said Beijing had "taken note of the relevant report and we express concern over the situation".