Exactly 40 years ago a security guard caught five burglars breaking in to a bleak building by the River Potomac in Washington.

In the building, called Watergate, was the HQ of the Democratic Party's presidential campaign headquarters. What followed was ... nothing very much. It took several weeks for the significance of the botched burglary to develop into what was the most serious political crisis America has ever known.

It led, eventually, to the utter humiliation and disgrace of President Richard Nixon who, several months after the burglary, in November 1972, was re-elected in a spectacular triumph, beating his Democrat opponent George McGovern by the colossal margin of over 17 million votes. It gave a considerable fillip to the printed media, because the truth was uncovered as a result of diligent and dogged investigation by two reporters on the Washington Post, Carl Bernstein and Bob Woodward. And it also led to the tiresome habit, with us to this day, of appending the suffix "–gate" to any scandal anywhere.

Messrs Bernstein and Woodward discovered that the burglars had links with the White House. They followed the trail and it led to Richard Nixon's re-election campaign committee ("CREEP"). One of the saddest aspects of the scandal was that it was breaking well before the November election – the Washington Post put a succession of Watergate stories on its front page in the autumn of 1972, and then three weeks before the election it published articles arguing that the growing scandal had huge political and indeed moral implications.

So it was not just Mr Nixon and his White House cronies who were disgraced, but the American electorate – for the ramifications of the burglary were very much in the public domain in the lead-up to the presidential election. The response of the White House had been a predictable but depressing mixture of obfuscation, bullying and denial – and in particular a venomous series of attacks on the press by Vice-President Spiro Agnew (himself soon to be disgraced in a separate scandal).

Amazingly, the Washington Post's campaign might have petered out but for the smeddum of Judge John Sirica, who gave the burglars draconian provisional sentences to encourage them to give evidence against the Nixon administration. One of them refused to comply; he was given 20 years in prison. This prompted the others to talk, and the whole sordid story was exposed in all its ugliness. In the summer of 1973 the President's own lawyer admitted to a Senate Committee that the US attorney-general had consented to the burglary, and that the President's chief of staff was also well aware of it.

Then it was revealed that the President had kept tapes of all his conversations. (Over in California, one Ronnie Reagan asked: "Why didn't he just destroy them?") President Nixon's direct involvement could no longer be denied. His demise was inevitable. It was clear that he had shamed not just himself, but America.

There is another side to all this. The media campaign against Mr Nixon and his aides latterly became a bitter witch hunt, for the President was detested by the East Coast liberal establishment. Yet he had made sincere and largely successful efforts to disengage from the lamentable war in Vietnam, reducing US forces there from almost 600,000 to just over 20,000. He had reached out to China in a way that was far-sighted, even visionary. Indeed Mao Tse Tung, according to the testimony of the then British Premier Ted Heath, simply couldn't understand what he called the "nonsense" of Mr Nixon's treatment. "We all bug our opponents, don't we?" he asked Ted Heath.

Mr Heath wrote that it was a "tragedy" that Watergate should have wiped all Mr Nixon's achievements from the public mind, and looking ahead, he worried that the scandal would "unbalance" the judgment of historians.

After Mr Nixon resigned, his successor, Gerald Ford, said: "This is an hour of history that troubles our minds and hurts our hearts." For decent Americans, the minds are still troubled, the hearts are still hurting.