The divided Korean peninsula appeared to be teetering on the brink of all-out war yesterday after the North fired dozens of shells across the border during military drills by the South. Two South Korean soldiers were killed and 16 other people were reportedly injured.

The artillery bombardment – one of the heaviest since the Korean War ended without a peace treaty in 1953 – left parts of Yeonpyeong island in the Yellow Sea, north-west of the capital Seoul, in smoking ruins.

President Lee Myung-bak put the South's military on its highest alert and called the shelling a "completely unforgivable" attack on civilians. Last night he appeared to be formulating a response that could include military strikes. "I think enormous retaliation is going to be necessary to make North Korea incapable of provoking us again," he told Yonhap news agency. Mr Lee insisted that an attack on a village of farmers and fishermen, accustomed to living in peace with the certainty that South Korean forces patrolling the waters around them would ensure their survival, could not go unanswered.

The attacks called for "a response beyond the rule of engagement", he said. As political pressure mounted for a return strike, he added: "Our military should show this through action rather than an administrative response."

In Seoul, fearful members of the public crowded around television sets showing black plumes of smoke rising from the island's village. The overriding question, as expressed by office worker Lee Yong-suk, was whether the flare-up would spread into a much wider confrontation in which North Korean gunners could intimidate the huge populace around Seoul and the nearby west coast port of Incheon.

"People are shocked," she said. "People are dying. It's a kind of war."

South Korea's defence ministry claimed that dozens of homes were hit in the hour-long attack, apparently targeted at a military base, and that the South Korean military fired back about 80 shells before the two sides returned to an uneasy stand-off. Local television said many of the island's 1,300 people have fled. "The administration and military must deal with North Korea's brutality using whatever means necessary," said An Young Hwan, a spokesperson for the ruling Grand National Party.

Pyongyang claimed the South fired first and threatened a "merciless" response. In a statement aired on the state-run KCNA news agency, the North's military said the South had "recklessly provoked" yesterday's exchange by firing "dozens of shells" inside its territorial waters during military exercises, "despite repeated warnings".

It added: "The revolutionary armed forces of the Democratic People's Republic of Korea standing guard over the inviolable territorial waters of the country took such decisive military step as reacting to the military provocation of the puppet group with a prompt powerful physical strike."

South Korean officials said the skirmish began when Pyongyang warned its neighbour to stop its military drills in the area. When Seoul refused and began firing artillery into disputed waters, albeit away from the North Korean shore, the North retaliated.

Both sides of one of the world's most heavily militarised borders are technically still at war with thousands of troops on hair-trigger alert. Sporadic shelling and exchanges of fire have occurred over the years – troops last fired on each other on 29 October. But yesterday's attack is considered especially serious because it was aimed at a populated area.

South Koreans appeared far more indignant over the attack yesterday than they were in March after the sinking of the Cheonan, split in two by a torpedo fired by a North Korean midget submarine, killing 46 sailors. South Koreans tended to view that episode as an isolated incident involving only military forces, not civilians.

The attack this time was seen as much more serious for one basic reason. "It was the first time they attacked us on land since the Korean War," said Lee Jong-min, professor at Yonsei University and ambassador on security affairs at the foreign ministry.

Nobody appeared to believe that the attack could have been at the orders of a regional commander acting on his own. "Kim Jong-il has to have ordered it," said Robert Collins, retired intelligence analyst for US command here.

Yesterday's attack marked an escalation. "I'm very concerned because this was a direct attack," said Shin Wha-lee, professor of International relations at Korea University in Seoul.

Pyongyang showed off a new uranium enrichment facility last weekend in a move denounced as "provocative" by Stephen Bosworth, the US special representative for North Korea policy.

But yesterday's deadly spat, which follows a month of hopeful signs in the always-volatile relationship, has Pyongyang watchers baffled. Some believe it may be a demonstration of power amid the looming succession of leader Kim Jong-il's son, Jong-un, catapulted from obscurity to senior military and political ranks at an extraordinary Workers' Party conference in September. The fear is that events inside the nuclear-armed North may be out of control as the balance of forces around Kim Snr shifts.

Russia and Japan condemned the shelling, but China, Pyongyang's old ally, held back, urging both sides to "do more to contribute to peace".

Mr Bosworth, who is visiting Beijing, said: "Restraint should be exercised on both sides." In the UK, Foreign Secretary William Hague strongly condemned the attack, which he said was "unprovoked". South Korean sources said that the US, which has 28,000 troops in the country, was keeping a "close watch" on developments, and had stepped up its force-wide alert.

Six decades of North-South tension

1950-53 The Korean War. Two million lives are lost during the three-year conflict.

1968 North Korean commandos are thwarted in an assassination attempt against South Korean President Park Chung-hee.

1972 Secret North-South talks aimed at unification of the two nations take place.

1974 North Korean agents stage another assassination attempt against President Park. The shot misses him, but kills his wife.

1987 A North Korean attack on a South Korean plane kills 115.

1996 North Korea declares that it will no longer honour the settlement which ended the Korean War.

1997 South Korean President Kim Dae-jung is elected, and adopts a "Sunshine policy" towards the North.

2003 After a spell of better relations, Pyongyang fuels tensions by declaring that it is able to make nuclear weapons.

2008 The new South Korean President Lee Myung-bak ends the Sunshine policy .

March 2010 A South Korean warship, the Cheonan, is sunk near the North Korean border, killing 46.

May 2010 South Korea says investigators have found evidence the North sank the Cheonan. Pyongyang denies the charge, and cuts all diplomatic ties with Seoul.

November 2010 North Korea shells an island on the border, putting the South's military on its highest alert since the war.