Tony Hall, the director-general of the BBC, has defended the corporation’s election output against accusations of bias, saying that the national broadcaster had faced criticisms of its output from both leftwing and rightwing commentators in the weeks leading up to voting day.

However, Lord Hall has spoken out in praise of the BBC’s polling coverage, claiming the fact that it received complaints from all sides demonstrated it was unbiased.

Writing in the Daily Telegraph, Hall said: “Around 27 million people in the UK came to the BBC website to find out about the election results. It was a reminder of the trust people place in the BBC.

“But the fact criticism came from all sides of the political divide shows to me that we were doing our job without fear or favour.”

Those sentiments have not been echoed by all BBC colleagues. Earlier this month, the BBC’s head of news and current affairs, Fran Unsworth said: “I don’t necessarily subscribe to the view that if we get complaints from both sides we are doing something right.”

Hall added: “Yes, of course we faced some criticism. That is to be expected as the national broadcaster. Where we can and need to improve, we will.”

Huw Edwards, who anchored the BBC’s election night coverage, has also previously dismissed claims of bias at the corporation, and said any such accusations are designed to cause “chaos and confusion”.

The News at Ten presenter said: “You realise yet again that the real purpose of many of the attacks is to undermine trust in institutions which have been sources of stability over many decades.”

Hall’s comments come as the BBC faces fresh questions from politicians over its future.

Boris Johnson is reported to be looking into consulting on whether people who do not pay the £154.50 licence fee for watching television or BBC’s iPlayer catch-up service should be prosecuted.