Michael Bettaney, who has died aged 68, was an MI5 officer who in 1983 attempted to spy for the Soviet Union. He was prevented and charged, but while on remand in prison he succeeded in passing sensitive information to the IRA. He was eventually sentenced to 23 years.

When Bettaney joined MI5 (the Security Service) in 1975 at the age of 25, the service was struggling to fulfil its operational commitments in Northern Ireland which, owing to the lack of trained case officers, it shared with MI6, the Secret Intelligence Service. Bettaney was sent on the five-month MI6 operational training course.

Despite relatively poor performance on the course, he was posted by MI5 to Northern Ireland to run agents against Republican targets. Although a congenial member of the team, he was noted for his heavy drinking and for facetious references to spying for the Russians – “I must tell my KGB case officer about that.”

He referred increasingly to his own Irish antecedents, occasionally making remarks such as, on hearing that an Army officer had had his legs blown off: “The boyos did a good one last night.”

On returning to London, he was posted first to MI5’s training department, then as a desk officer to K Branch, the directorate responsible for monitoring and countering Soviet Bloc intelligence activities in Britain.