Jeremy Corbyn’s team has sent a complaint to the BBC over its Panorama feature on the Labour leadership front-runner, The Independent has learnt.

His camp claims the BBC lied to them about the purpose and content of the programme and has also complained about factual inaccuracies contained in the documentary.

It is demanding an apology from the broadcaster over its handling of the programme, which was given the title Jeremy Corbyn: Labour’s Earthquake and shown on BBC One last Monday.

A source in Mr Corbyn’s campaign accused the BBC of conducting "a complete hatchet job" on Mr Corbyn.

Panorama producers apparently told them they were filming for a documentary about the Labour leadership campaign as a whole, including all four candidates, but instead the programme turned out to be all about the one candidate, as the title of the show suggests, and only included a few brief clips of his three rivals.

His campaign team said they have sent a copy of Mr Corbyn’s diary to prove he did not attend a conference in Cairo that advocated attacks on British and American troops, as was stated by the programme's presenter, John Ware.

The diary proves he attended events in his Islington constituency, his campaign claims. However the BBC said they had yet to receive a copy of it.

The programme investigated the rise of Mr Corbyn and showed clips from a number of his rallies over the summer. It also included a number of warnings from high profile Blairite figures warning that a Corbyn victory could reignite the divisions of Labour's past and bring back the "thuggery and intimidation" of the militant left.

It attracted hundreds of complaints from viewers who claimed it was biased against Mr Corbyn and who accused the BBC of trying to persuade undecided voters not to vote for him, less than three days before the deadline for voting closed.

Labour leadership: The Contenders Show all 4 1 /4 Labour leadership: The Contenders Labour leadership: The Contenders Jeremy Corbyn Jeremy Corbyn started off as the rank outsider in the race to replace Ed Miliband and admitted he was only standing to ensure the left of the party was given a voice in the contest. But the Islington North MP, who first entered Parliament in 1983, is now the firm favourite to be elected Labour leader on September 12 after a surge in left-wing supporters signing up for a vote. PA Labour leadership: The Contenders Liz Kendall Liz Kendall has been labelled the Blairite candidate throughout the contest, which partly explains why she has failed to attract the support needed in a party that has drifted even further from the centre-ground of British politics since the election. She has faced criticism over her relative lack of experience, having only served as an MP since 2010 and having no experience of ministerial or shadow cabinet roles. But that very lack of experience allowed her to initially make a pitch as the only candidate offering real change and a real break from the Blair/Brown/Miliband years, until Jeremy Corbyn entered the race and shifted the whole debate to the left. She is set to finish a disappointing fourth. PA Labour leadership: The Contenders Andy Burnham Andy Burnham started out as the front-runner in the leadership election, seen as the candidate of the left until Jeremy Corbyn entered the race. The former Cabinet minister has found himself squeezed between the growing populism of Corbyn’s radical agenda and the moderate, centre-left Yvette Cooper, not knowing which way to turn. It has attracted damaging labels such as ‘flip-flop Andy’, most notably over his response to the Government’s Welfare Bill. He remains hopeful he can win enough second preference votes to take him over the 50 per cent threshold ahead of Corbyn. PA Labour leadership: The Contenders Yvette Cooper.jpg Yvette Cooper has put her experience and achievements in government at the heart of her offer to the Labour party. She played a key part in setting up Sure Start in Tony Blair’s government and has pledged to continue her record on delivering for young families by promising a “revolution in the way families are supported” by introducing universal free childcare. She has also championed her role as a full-time working mother, taking pride in telling audiences that she does the school run for the kids before her day starts as a politician. But she has been criticised for being too wooden and lacking in passion and her attacks on Liz Kendall for “swallowing the Tory manifesto” at the start of the leadership contest have been criticised for helping Jeremy Corbyn brand all three mainstream candidates as ‘Tory-lite’. PA

The dispute threatens to damage what is promising to be a good relationship between Mr Corbyn and the BBC, which faces the prospect of deep-rooted reforms by the Conservative government and a battle to maintain its ability to charge a £145 a-year licence fee, its main source of revenue.

Mr Corbyn has pledged to “put Labour at the forefront of the campaign to defend the BBC” if he wins the Labour leadership on Saturday.

One Corbyn supporter and disgruntled viewer of the Panorama episode took to Twitter to publish details of how to lodge a complaint against the BBC about the programme, sparking a surge in objections.

A BBC spokesperson said: “We began looking at the leadership election as a whole, but as Jeremy Corbyn became the front runner our programme naturally focused in on that.

"This sort of editorial decision making is normal. Corbyn’s team gave Panorama behind the scenes access to his campaign and his views were reflected throughout, including through a lengthy interview.

"The programme also clearly reflected the growth of support for his campaign within the party, union members and activists.