The CIA took an interest in Jeremy Corbyn's visits to countries with Marxist regimes in the same period that he was being courted by a Communist spy in London, declassified files show.

The US spy agency made references to Mr Corbyn visiting El Salvador and Grenada in his days as a backbench MP, including a trip to a conference organised by a trade union with links to the Soviet Union and guerilla fighters.

The files form part of a cache of documents that show deep concern within the CIA about the Labour Party in general during Margaret Thatcher’s premiership, when the agency regarded Labour as “a threat to US interests”.

Mr Corbyn was not the only Labour MP the CIA was keeping tabs on; the then Labour leader Neil Kinnock crops up almost 40 times in the files.

In 1986, when Ronald Reagan was president, the US Embassy in San Salvador cabled Washington with details of Mr Corbyn’s attendance at a conference of the El Salvador trade union Fenastras.