The battle for Korea, which began 60 years ago next week, is barely remembered in the US. Yet it created the template for conflict in the 21st century

For America it is the "forgotten war", an inconclusive and not especially noteworthy parenthesis between the triumph of the Second World War and the tragedy of Vietnam. For those who did not experience its grinding savagery first-hand, the most abiding associations are entertainments like M*A*S*H and The Manchurian Candidate, and battlefields with names like Old Baldy and Pork Chop Hill that might have featured in America's own civil war almost a century before. For the two halves of Korea, the conflict is anything but forgotten. Indeed, like the past itself, the Korean War that broke out exactly 60 years ago isn't even past.

The war was a surprise, but shouldn't have been. Back in 1950, just as today, Korea was divided in two, geographically, ideologically and militarily. On 8 June that year, however, the newspapers of the communist North published a plan of the ruling central committee for elections to be held across the entire peninsula within two months. The report appeared on 10 June in the Soviet paper Izvestia. There was no mention of the South, and in retrospect the conclusion was obvious – that the North was about to redraw the political map unilaterally. But no one made the connection.

On 25 June, 1950, the North invaded, taking the South and its American protectors off-guard. Within 48 hours the United Nations had passed a resolution condemning the aggression and vowing to correct it. But that did not prevent the Korean People's Army of the "Great Leader" Kim Il-sung from overrunning Seoul within days. In a few weeks, the KPA had reached the gates of Pusan at the south-eastern tip of the peninsula, having wreaked terror and havoc on the civilian population as it passed.

Somehow, the US defended the "Pusan Perimeter", reinforcing its garrison first with contingents from Japan and then from home soil. No less important, its superiority in the air allowed it to disrupt the North's extended supply lines. Then in September, General Douglas MacArthur – overall commander for Korea though he never deigned to spend a night in the country – struck back with a counterattacking masterpiece, the amphibious Inchon landings west of Seoul that effectively cut off a weary and over-stretched KPA.

Now it was the North's turn to be overrun. By October 1950, the US Eighth Army captured Pyongyang and advance units of the UN coalition reached the Yalu River, North Korea's border with China, where Mao Tse Tung's communists had taken power only a year before. It was a disastrous step too far. At first covertly, then openly, the Chinese army intervened, driving the UN back across the 38th parallel, the old border.

But by mid-1951 the front lines had stabilised and strategic stalemate took over. After two years of attrition, an armistice was signed on 27 July, 1953, establishing the new frontier, the Demilitarized Zone, close to the original line of partition.

With the exception of a clear-cut result, the Korean War lacked nothing by comparison with the bloodiest regional wars of history. The exact number of casualties will never be known, but historians reckon that four million may have perished, more than half of them civilians. The vast bulk of military losses were suffered by the North Korean, South Korean and Chinese forces. But 54,000 Americans were killed, almost as many as in Vietnam, with a further 8,000 missing in action. Britain, a member of the 20-nation UN coalition, lost over 1,100 men.

As in every modern war, there were blunders and brilliant operations, deeds of heroism and cowardice, great victories and humiliating defeats. There was also an epic clash of personality in which a US president, Harry Truman, was forced to prove, by sacking the egotistical and grossly insubordinate MacArthur, that the mightiest army on earth was, as the constitution stipulated, ultimately under civilian command. But MacArthur's downfall at least allowed his successor, General Matthew Ridgeway, who held the US and UN forces together against the Chinese onslaught, to earn rightful recognition as one of America's greatest ever military commanders.

The lessons of Korea 1950/1953 do not end there. Few wars have so clearly demonstrated how miscalculations and wrong signals can have terrible consequences. In January 1950, Dean Acheson, Truman's Secretary of State, gave a speech in Washington that seemed to suggest that Korea was not a strategic priority for the US – perhaps leading Kim and Joseph Stalin, his patron in the Kremlin, to suppose that America would acquiesce in an invasion.

How wrong they were. As wrong as was MacArthur later the same year to assume that America could effectively annex North Korea, and that China could be cowed into similar acquiescence at a fait accompli. Both were misjudgements of the adversary and his strength, for each of which a dreadful price was paid.

But why did the US defend Korea – or to borrow the words engraved in marble at the Korean War Memorial on Washington's Mall, why did America and its allies "send their sons and daughters to defend a country they never knew and a people they never met"? Simply because, as the Cold War intensified, the US had no choice. In 1948 the Russians had cut off Berlin, in 1949 the US could only watch as the Nationalists were defeated in China. The loss of Korea would have destroyed US credibility worldwide.

Over China's intentions, MacArthur made the same error in reverse. He failed to appreciate how the new communist regime in Beijing – not to mention its "big brother" in Moscow – would not tolerate military defeat for another communist state on its border. Korea was the first major war since the Second World War. It was largely brought about because neither adversary understood how after the end of the Second World War, the rules of the game had changed.

Korea was the end of an era, the last military hurrah of the old Commonwealth as troops from the UK, Canada, Australia and New Zealand fought for the last time under the banner of "British Commonwealth Forces". It was also a beginning, the debut of the UN in international affairs (thanks, ironically, to a Security Council resolution made possible by a Soviet boycott of the UN because China's Council seat had just been assigned to the Nationalists, not the communists, in Beijing) – but also the emergence of communist China as a major power on the world stage.

But perhaps the most important thing about the Korean War is what did not happen. Nuclear weapons were not used, even when American conventional forces were taking a beating. With the benefit of six decades of hindsight, that might seem unsurprising. But only five years earlier, in 1945, American atomic bombs had forced a foe in East Asia to surrender. Why not again, especially when Truman's national security advisers had just drawn up NSC-68, a policy document warning of a "fanatical" Soviet rival, placing the survival of not just this Republic (the US) but civilisation itself at stake? True, Moscow had conducted its first nuclear test, on 29 August, 1949, but the US still had a huge lead.

The Korean War certainly did not lack for unpleasantness. It witnessed both massive "collateral damage", and horrific deliberate crimes, against civilians. It saw the first systematic use of napalm. American warplanes carried out devastating bombing raids on North Korean cities. But the very worst did not come to pass.

Korea set the template for the concept of "limited war". Self-evidently, limited wars have limited aims and limited scope, that tend to make them hard public sells. So it proved for Truman, whose popularity plummeted as a result of US involvement in a civil war in a faraway country. But the American president also realised that unless the conflict stayed limited, the consequence might be World War III.

His confrontation with MacArthur encapsulated the dilemma. The general believed that total war, and total victory, were possible, even if that meant using nuclear weapons. Truman himself once hinted that this was an option, but quickly changed his mind. Not so MacArthur, who boasted in private memoirs later that, in order to choke off Chinese incursions into Korea, "I would have dropped between 30 and 50 atomic bombs ... strung across the neck of Manchuria. My plan was a cinch."

But Truman prevailed, and limited war has been the model ever since. In Vietnam, where the moral and practical case for US intervention was far weaker than in Korea, it failed. If Korea was a draw, Vietnam was the most stinging defeat in American history. But there, as in Iraq (twice) and in Afghanistan, limited war has been the rule.

Another lesson of Korea that still holds good today is that, in the real world, the UN is only a force to the extent that it and the US are singing from the same hymn-sheet. In the first Gulf War they were, and in 1990 the first President Bush assembled a coalition against Saddam Hussein whose sheer breadth gave it unchallenged legitimacy. Not so his son, who rode roughshod over the UN in 2003, taking America into a war whose cost it continues to count.

Unlike Saddam moreover, a divided Korea is as relevant now as it was 60 years ago. Three months ago, Kim Jong-il, the son and successor of Kim Il-sung, set the world on edge by sinking a South Korean warship and threatening to unleash Armageddon if anyone retaliated. All logic dictates otherwise. But 60 years ago, logic did not prevail. Once again China holds the key – only this time, both China and North Korea have nuclear weapons. Even Douglas MacArthur would surely have second thoughts now about the merits of unlimited war.