Nelson Mandela is feted today as a hero, but in the past British police put anti-apartheid campaigners under extensive surveillance

British politicians have been queueing up to pay tribute to Nelson Mandela in recent days. There were many times of course when the British establishment did not give him and the anti-apartheid movement such whole-hearted support.

Today Conservative politicians such as David Cameron may laud him as a hero, but back in the day, Cameron's real hero, Margaret Thatcher, denounced the African National Congress as "a typical terrorist organisation".

Read this and this, for example, by my colleagues Marina Hyde and Hugh Muir, for a caustic view on what might charitably be called a change of heart.

It should also not be forgotten that the British police went to enormous lengths to infiltrate and disrupt the campaign in this country to help sweep away apartheid.

Previously confidential official files released under the freedom of information act show how Special Branch penetrated the Anti-Apartheid Movement from top to bottom over 25 years. The infiltration stretched at least from 1969 to 1995, according to the files.

Copies of some of the files are here and here.

It seemed that Special Branch saw fit to snoop on even the smallest gatherings of campaigners.

One report details how the Croydon branch of the Anti-Apartheid Movement held a meeting at 7.30pm on May 27 1982 at the White Horse Manor school in Thornton Heath. How many campaigners were at this meeting? Seven, it seems.

Special Branch diligently records that the seven finished their meeting at 9.45, "without incident."

It is striking how it seems that no detail is too trivial to be stored. Here are some examples :

In September 1984, the Special Branch in Surrey reported that a student working part-time at Sainsbury's was "actively passing anti-apartheid literature to other members of staff." A report on the student was sent to an entity described merely in the files as "Snuffbox" - a codename for the security service, MI5.

In October 1982, a Home Beat officer in Barnet, north London deemed it necessary to report to the Commander of Special Branch that "he had discovered a shed which contains a large number of political posters with a left-wing bias." A detective constable was deputed to investigate and reported that the posters probably belonged to local anti-apartheid campaigners.

Special Branch noted at one point in the 1970s how a 17-year had formed a local group in the west London suburb of Ealing.

Some of the reports appear to have emanated from informants (activists who have been recruited by the police to pass on information).

For instance, a "secret and reliable source" supplied information about the monthly meeting of the Highgate branch of the Anti-Apartheid Movement in June 1982. Six campaigners were at the meeting which was held at the home of one of the activists. The source appears to have been attended as he or she was in a position to report details of the meeting, such as the fact that it started at 7.30pm and ended at 10.20pm. The source could also report that "the meeting adhered to the prepared agenda, a copy of which was submitted with" his or her account.

The files contain confidential reports of demonstrations (names of speakers, what they said, how they were received by the audience and the such like) and plans for protests in the pipeline.

There are also reports of private meetings of the movement's national leaders, along with the makes and registration numbers of their cars, and copies of internal memos.

The files were were unearthed by BBC journalist Martin Rosenbaum for a 2005 radio programme. He says that Special Branch had around 30 inch-thick files cataloguing its surveillance of the anti-apartheid movement. See here and here for more details of the programme.

In 1968, Special Branch set up its covert unit of long-term undercover officers, known as the Special Demonstration Squad. The Anti-Apartheid Movement was one of the first political groups to be penetrated by an SDS officer.

One of the unit's first undercover officers, Mike Ferguson, was sent to infiltrate the anti-apartheid movement in the late 1960s.

According to this account in a BBC documentary, his handler, another Special Branch officer called Wilf Knight, said Ferguson foiled at least one demonstration by the anti-apartheid campaigners.

Knight tells a story of how the campaigners suspected that there was a spy within the ranks. Ferguson deflected attention from himself by pointing the finger of suspicion at another campaigner. Wrongly accusing innocent activists was a favourite tactic of the undercover spies to save themselves from being rumbled.

How many undercover police officers spied on anti-apartheid activists over the decades is not known - another of Scotland Yard's secrets.

Perhaps one day, the long-running internal police investigation into the conduct of the undercover officers, known as Operation Herne, may tell the public?

* This blog was amended on December 11 to clarify that the Anti-Apartheid Movement was one of the first groups to be infiltrated by the SDS.