This has likely happened before during the cold war when there were concerns that communists had infiltrated the Labour party. Harold Wilson famously believed he was being spied on throughout his term as prime minister