Veteran investigative journalist John Sweeney called Tommy Robinson a “c***” as he announced his departure from the BBC.

“I'm sorry our BBC Panorama on Tommy Robinson wasn't broadcast,” Mr Sweeney wrote on Twitter, referring to a planned edition of the programme that was not broadcast about the English Defence League.

It was cancelled after Robinson, whose real name is Stephen Yaxley-Lennon, covertly filmed Mr Sweeney and made a rival “documentary”.

Mr Sweeney added: “So after 17 years I can finally say these are not the views of the BBC but he's a complete c**t.”

Robinson was the focus of a documentary due to be broadcast earlier this year, after he was imprisoned for contempt of court last year.

Tommy Robinson supporters standoff with police Show all 11 1 /11 Tommy Robinson supporters standoff with police Tommy Robinson supporters standoff with police Tommy Robinson (Stephen Yaxley-Lennon) supporters in Oxford Street protesting against his prison sentence after he was jailed for nine months for contempt of court PA Tommy Robinson supporters standoff with police Police chase supporters in order to keep them apart from counter-protesters AFP/Getty Images Tommy Robinson supporters standoff with police Police confront supporters AFP/Getty Images Tommy Robinson supporters standoff with police TOPSHOT - Police grapple with supporters of Stephen Yaxley-Lennon, AKA Tommy Robinson, founder and former leader of the anti-Islam English Defence League (EDL), in central London on August 3, 2019, as they keep the supporters apart from counter-protesters from 'Stop Tommy Robinson' and 'Stand up to Racism'. - British far-right figurehead Tommy Robinson was jailed for contempt of court on July 11, having live-streamed a confrontation with defendants in a criminal trial that was subject to reporting restrictions. (Photo by Tolga AKMEN / AFP)TOLGA AKMEN/AFP/Getty Images TOLGA AKMEN AFP/Getty Images Tommy Robinson supporters standoff with police Police grapple with supporters of Stephen Yaxley-Lennon, AKA Tommy Robinson, founder and former leader of the anti-Islam English Defence League (EDL), in central London on August 3, 2019, as they keep the supporters apart from counter-protesters from 'Stop Tommy Robinson' and 'Stand up to Racism'. - British far-right figurehead Tommy Robinson was jailed for contempt of court on July 11, having live-streamed a confrontation with defendants in a criminal trial that was subject to reporting restrictions. (Photo by Tolga AKMEN / AFP)TOLGA AKMEN/AFP/Getty Images TOLGA AKMEN AFP/Getty Images Tommy Robinson supporters standoff with police Tommy Robinson supporters in Oxford Street in London protesting against his prison sentence after he was jailed for nine months for contempt of court over a video he broadcast on Facebook which featured defendants in a criminal trial. PRESS ASSOCIATION Photo. Picture date: Saturday August 3, 2019. Photo credit should read: Steve Parsons/PA Wire Steve Parsons PA Tommy Robinson supporters standoff with police Police grapple with a supporter of Stephen Yaxley-Lennon, AKA Tommy Robinson, founder and former leader of the anti-Islam English Defence League (EDL), in central London on August 3, 2019, as they keep the supporters apart from counter-protesters from 'Stop Tommy Robinson' and 'Stand up to Racism'. - British far-right figurehead Tommy Robinson was jailed for contempt of court on July 11, having live-streamed a confrontation with defendants in a criminal trial that was subject to reporting restrictions. (Photo by Tolga AKMEN / AFP)TOLGA AKMEN/AFP/Getty Images TOLGA AKMEN AFP/Getty Images Tommy Robinson supporters standoff with police A supporter of Stephen Yaxley-Lennon, AKA Tommy Robinson, founder and former leader of the anti-Islam English Defence League (EDL) shouts as police form a cordon between supporters and counter-protesters from 'Stop Tommy Robinson' and 'Stand up to Racism', in central London on August 3, 2019. - British far-right figurehead Tommy Robinson was jailed for contempt of court on July 11, having live-streamed a confrontation with defendants in a criminal trial that was subject to reporting restrictions. (Photo by Tolga AKMEN / AFP)TOLGA AKMEN/AFP/Getty Images TOLGA AKMEN AFP/Getty Images Tommy Robinson supporters standoff with police Police watch supporters of Stephen Yaxley-Lennon, AKA Tommy Robinson, founder and former leader of the anti-Islam English Defence League (EDL), in central London on August 3, 2019, as they keep the supporters apart from counter-protesters from 'Stop Tommy Robinson' and 'Stand up to Racism'. - British far-right figurehead Tommy Robinson was jailed for contempt of court on July 11, having live-streamed a confrontation with defendants in a criminal trial that was subject to reporting restrictions. (Photo by Tolga AKMEN / AFP)TOLGA AKMEN/AFP/Getty Images TOLGA AKMEN AFP/Getty Images Tommy Robinson supporters standoff with police Tommy Robinson supporters in Oxford Street in London protesting against his prison sentence after he was jailed for nine months for contempt of court over a video he broadcast on Facebook which featured defendants in a criminal trial. PRESS ASSOCIATION Photo. Picture date: Saturday August 3, 2019. Photo credit should read: Steve Parsons/PA Wire Steve Parsons PA Tommy Robinson supporters standoff with police Tommy Robinson supporters in Oxford Street in London protesting against his prison sentence after he was jailed for nine months for contempt of court over a video he broadcast on Facebook which featured defendants in a criminal trial. PRESS ASSOCIATION Photo. Picture date: Saturday August 3, 2019. Photo credit should read: Steve Parsons/PA Wire Steve Parsons PA

During production, one of his former aides secretly filmed Mr Sweeney in a Cambridge pub after they offered to give interviews to Panorama.

The footage showed the journalist calling the BBC a “stupid and irritating organisation”. He also claimed that managers had previously attempted to make him redundant.

After ordering a significant quantity of alcohol, Mr Sweeney said he was “on expenses”.

He also suggested he was from a “scumbag Irish background”, before calling a counter-extremist researcher a “bloody woofter”.

Robinson played the footage to Mr Sweeney and told him “you’re finished” after arranging to conduct an interview with Panorama.

“If you think I’m finished you’ve got another thing coming and I can give you that for free,” Mr Sweeney replied.

Robinson's video was compiled into a film called Panodrama and played at a protest by his supporters in Salford Quays in February.

The far-right activist later claimed credit for Mr Sweeney's departure from the BBC in a message to supporters on the Telegram messaging app.

The BBC previously rejected Robinson’s claims that its journalism was “faked or biased” and said all programmes adhere to strict editorial guidelines.

Tommy Robinson addresses supporters outside the BBC in Salford's Media City (PA)

“Some of the footage which has been released was recorded without our knowledge during this investigation and John Sweeney made some offensive and inappropriate remarks, for which he apologises,” a spokesperson said earlier this year.

The National Union of Journalists condemned Robinson and “far-right thugs” for attempting to intimidate BBC reporters including Mr Sweeney.

Mr Sweeney said he “paid for all the drinks” after announcing his departure from the corporation.

Support free-thinking journalism and attend Independent events

He said it was “high time to make trouble elsewhere” and said he would travel to Malta in relation to a book on murdered investigative reporter Daphne Caruana Galizia.

“I remain an old school reporter, up for the right kind of trouble,” he added. “I'll be back.”

Mr Sweeney worked at The Observer before joining the BBC in 2001, working on investigations including the wrongful imprisonment of mothers over cot deaths, Scientology, North Korea and Russian influence on the US election.