A private investigator who pleaded guilty today to running an unlawful blacklisting service on building workers has been snooping on trade unionists and political activists for more than 30 years, the Guardian can reveal.

Ian Kerr, of Stoke Heath, in the West Midlands, faces an unlimited fine or prison term after he admitted at Macclesfield magistrates court that he had illegally run a secret database of 3,200 workers, in breach of privacy laws, through an agency known as the Consulting Association.

Building workers at the hearing applauded after the chairman of the bench, Adrian Long, passed the case up to the crown court because his sentencing powers under the Data Protection Act were "woefully inadequate".

The prosecution was brought by the information commissioner, Richard Thomas, after it emerged that Kerr, 66, sold the data to businesses including Balfour Beatty, Sir Robert McAlpine, Laing O'Rourke and Costain, some of the UK's largest construction companies.

As the Guardian revealed in March, the commissioner closed down Kerr's business and sent warning letters to 40 companies because it suspected workers were being unfairly blacklisted. Some of those firms now face prosecution.

A Guardian investigation suggests that Kerr began investigating trade unionists and leftwing activists in the 1970s for the Economic League, a secretive, rightwing vetting organisation set up in 1919.

The league had files on as many as 45,000 people it considered to be "subversive", "troublemakers" and "extreme leftwing". It was paid by more than 2,000 companies to vet potential employees against its list and weed out those it believed were active trade unionists or would be disruptive.

Michael Noar, the league's director-general between 1986 and 1989, said Kerr had worked for the organisation for a long time, infiltrating "a lot" of trade union and political meetings, recording who had said what and taking away documents such as attendance lists.

Noar said: "He was a key guy. He was one of our most effective research people – his information was genuine and reliable."

Kerr refused to discuss his involvement with the league or the source of his records, and did not appear in court today.

His solicitor, James Strong, told magistrates that Kerr was just a Consulting Association employee and "brought in effectively as a data controller" for an unnamed trade association. Strong said Kerr took the court hearing "extremely seriously", but said the public perception that Kerr was involved for "significant financial gain" was "simply not the case."

Minutes from internal Economic League meetings in 1988 show that Kerr liaised with construction companies who were collectively known inside the league as the Service Group. They got greater help with vetting and covert intelligence-gathering on union activists, allegedly leftwing employees and workers who complained about safety or rights at work.

The league had by the late 1980s begun to run into financial trouble as the media and campaigners exposed its controversial methods. Companies stopped subscribing after it emerged it kept inaccurate files, based on hearsay, on individuals unfairly blocked from jobs.

The league minutes show Kerr put forward suggestions about how it could raise more money from the Services Group. A confidential letter from the Costain construction firm to the Economic League in 1988 names Kerr as an important official in the organisation.

The league was wound up in 1993 and at about that time, the information commissioner believes, Kerr took the league files on construction workers and set up the Consulting Association.

For the next 15 years, he was paid by construction firms to run checks on individuals, until his agency was closed down by Thomas's officials. They seized Kerr's entire database and found that some of the files were more than 30 years old; many had been named by the league before it had collapsed.

One card with the letter "K" on it – a code used by the league to designate the building industry – records the trade union and political activities of Alan Ritchie, now general secretary of the Ucatt construction workers' union. It notes he was a "leading striker" at the Govan shipyard in Glasgow.

Other files used by Kerr that date back to the early 1970s, and seen by the Guardian, described one building worker in Liverpool as "politically unstable" and "extreme", while another in Twickenham, London, was sacked after the league named him as a militant strike leader and said he was "identical" to an Irish communist. A third in Wembley was named as a "political menace" because he supported "extreme elements".

Mick Gorrill, an assistant information commissioner, welcomed the case's transfer to the crown court. "Ian Kerr colluded with construction firms for many years flouting the Data Protection Act and ignoring thousands of people's privacy rights," he said.