Forty years ago today, a bullet severed the spine of a man whom many the world over thought of as a prince. We have all seen the picture of the hotel balcony where that prince stood, and fell, surrounded by his entourage, all pointing - presumably, in the direction from which the bullet came.

All but one.

One man was not standing, not pointing, but kneeling by Martin Luther King's body, presumably checking to see if - or that - he was dead. That man, Merrell McCullough, was an undercover police officer who had infiltrated King's circle. According to Time magazine, he worked for the Central Intelligence Agency, at least as far back as 1974.

What interest could an intelligence agency have in a man who plainly believed only in peace? In August 1967, four months after King called the US government the "greatest purveyor of violence in the world today," three months after 30 members of the Black Panther party marched, armed, into the California state capitol and onto the front pages of newspapers worldwide, J Edgar Hoover, the head of America's domestic law enforcement agency, the Federal Bureau of Investigation, issued the following directive: "The purpose of this new counterintelligence endeavour is to expose, disrupt, misdirect, discredit or otherwise neutralise the activities of black-nationalist, hate-type organisations and groupings, their leadership, spokesmen, membership and supporters."

By "hate-type organisations", Hoover explained that he meant "such groups as the Student Nonviolent Coordinating Committee, [King's] Southern Christian Leadership Conference ... the Congress of Racial Equality and the Nation of Islam", the group Malcolm X belonged to until shortly before his 1965 murder. In February 1968, there was a massive demonstration in support of the then-imprisoned leader of the Black Panthers, and Stokely Carmichael and H Rap Brown merged SNCC with the Panthers. Hoover issued another directive: "Prevent the rise of a 'messiah' who could unify and electrify the militant black nationalist movement. Malcolm X might have been such a 'messiah'... . Martin Luther King, Stokely Carmichael, and [Nation of Islam leader] Elijah Muhammed [sic] all aspire to this position ... . King could be a very real contender for this position should he abandon his supposed 'obedience' to 'white, liberal doctrines' (nonviolence)."

According to another declassified FBI memo, shortly afterward the FBI proposed having "a carbon copy of [an] informant report reportedly written by Carmichael to the CIA carefully deposited in the automobile of a close black nationalist friend. ... It is hoped that when the informant report is read it will help promote distrust between Carmichael and the black community." FBI agents called Carmichael's mother, falsely telling her that Black Panthers were out to kill her son. Soon after, Carmichael left the country.

While the guns that killed Malcolm X were held by black hands, we now know that his bodyguard the day he was shot was an undercover police agent, who later infiltrated the New York chapter of the Black Panther party and charged many of its leaders with various crimes. (The "Panther 21" were acquitted of all terrorism charges, but during their two-year incarceration the chapter fell apart.)

Panther bodyguards had a habit of not doing a very good job. The 21-year-old leader of the Panthers' Chicago chapter, Fred Hampton, was murdered by Chicago police after they raided his home at 4:45 the morning of December 4, 1969. Police fired a hundred rounds into the building, most directed toward Hampton's bedroom. Hampton's personal bodyguard, William O'Neal, had drawn a floor plan of the house for the authorities. "It is felt," an FBI agent wrote to Hoover after the killing, "that this information is of considerable value in consideration of a special payment for informant requested in re Chicago letter." (O'Neal was paid $300 by the FBI after the Hampton murder. In 1982, the city of Chicago paid the families of the survivors of the raid and its two victims $1.85m.)

Sometimes the FBI kept its hands clean when playing dirty tricks. In southern California, Ron Karenga's US organisation was vying for power with the Black Panther party, whose Los Angeles chapter was led by Bunchy Carter. Under the heading "Tangible results", one FBI memo reads: "Shootings, beatings and a high degree of unrest continues to prevail in the ghetto area of southeast San Diego. Although no specific counterintelligence action can be credited with contributing to this over-all situation, it is felt that a substantial amount of the unrest is directly attributable to this programme." The memo goes on to propose a further action that "In view of the recent killing of BPP member Sylvester Bell ... will assist in the continuance of the rift between BPP and US." On January 17, 1969, Bunchy Carter and another Panther were murdered by two US members on the campus of the University of California at Los Angeles.

Almost 30 years after the murders, I spoke to a man whom I believed to be Carter's nephew. He refused to acknowledge (or deny) his kinship. I called Ericka Huggins, the widow of the other Panther killed that day. She asked me how I got her telephone number and hung up on me in less than a minute. The mothers of Herod's victims must have felt this way.

"Geronimo" Pratt took over as the leader of the Los Angeles chapter of the Black Panther party after Carter's murder. A 1970 FBI memo reads that "constant consideration is given to the possibility of the utilisation of counterintelligence measures with efforts being directed toward neutralising Pratt as an effective BPP functionary." Pratt was convicted of murder in 1972 based on the false testimony of Julius Butler, an FBI informant. Pratt's conviction was overturned in 1997, after he had spent 27 years behind bars. Hoover, describing another Cointelpro operation, explains that the "purpose of counterintelligence action is to disrupt BPP and it is immaterial whether facts exist to substantiate the charge."

Of course, one might think that it is only meet that a government police force crack down on a supposedly violent group by any means necessary, especially if it is "the greatest threat to the internal security of the country", as Hoover called the Panthers. However, it was not because of their guns (always legally held and handled) that he deemed them so: it was because of the Panthers' Free Breakfasts for Children programme. As Hoover chides an FBI agent: "You state that the Bureau under the CIP should not attack programmes of community interest such as the BPP 'Breakfast for Children'. You state that this is because many prominent 'humanitarians', both white and black, are interested in the programme as well as churches which are actively supporting it. You have obviously missed the point."

So if the Panthers were not crazy thugs, why do we have this view of them today? Hoover directed his agents to "prevent militant black nationalist groups and leaders from gaining respectability, by discrediting them ... to the white community." My favourite Cointelpro operation is the one dealing with colouring books: The FBI created children's colouring books showing blacks murdering whites, ostensibly made by the Black Panther party to indoctrinate black children at Panther schools, so that whites and "moderate" blacks would be repulsed by these radicals.

Which brings us back to King. No doubt this week, much will be made of the FBI's snooping on King, and King's alleged sexual escapades. What will not be thought about much in America is that the primary source for this questionable information was Hoover, who ironically called King a "notorious liar" at a 1964 press conference and was even so petty as to try to stop a university from giving King an honorary degree.

A report compiled by the US Congress quotes from a March 28, 1968 FBI memo: "A sanitation strike has been going on in Memphis for some time. Martin Luther King Jr today led a march composed of 5,000 to 6,000 people. ... As the march developed, acts of violence and vandalism broke out." The memo continues: "This clearly demonstrates that acts of so-called nonviolence advocated by King cannot be controlled. The same thing could happen in his planned massive civil disobedience for Washington in April."

One week later, King was dead.

When Britons ask why the American peace movement is so weak, the answer is Cointelpro. In all, the US government spent about $100m (almost $550m or £275m in today's currency) destabilising or destroying black, indigenous and left-wing movements in America, and their potential future leadership.