Image copyright Getty Images Image caption The comedy quiz show had booked Change UK leader Heidi Allen

Friday night's episode of TV panel show Have I Got News For You was pulled by the BBC as it risked falling foul of its pre-European election rules.

The pre-recorded episode featured Change UK acting leader MP Heidi Allen.

The BBC said it was "inappropriate to feature political party leaders" in an election period as it did not allow for "equal representation" of views.

Hat Trick Productions, which makes the show, said it "tried everything" to get the BBC to broadcast the episode.

It added it was told of the decision "late this [Friday] afternoon".

An episode of Would I Lie to You was shown on BBC One instead. European Parliament elections are due to take place in the UK on 23 May.

On Thursday, Ms Allen - who left the Conservatives to join the recently-formed party - tweeted to say she was taking part in the programme, which regularly features politicians.

But less than half an hour before the episode was due to be broadcast, the HIGNFY Twitter account announced the cancellation.

It wrote: "Sorry everyone. The BBC have pulled tonight's edition of #HIGNFY - no, we didn't book Danny Baker. We booked Heidi Allen, a member of a party no-one knows the name of (not even the people in it), because the Euro elections, which nobody wants, may or may not be happening. Sorry."

The move prompted a strong reaction on social media, with some questioning why the show was cancelled but leader of the newly-established Brexit Party, Nigel Farage, recently appeared on the BBC's political debate programme, Question Time.

In a letter to the BBC, Change UK asked for a full explanation, claiming the broadcaster is giving Mr Farage more favourable coverage.

The BBC has been contacted for a response but earlier, the broadcaster's live political programmes editor, Rob Burley, commented in a tweet: "A show can't, in an election period, only feature one party in a run of shows."

Under BBC editorial policy guidelines, programmes are expected to ensure parties are given proportionate coverage over an appropriate period of time.

An earlier statement from the BBC read: "The BBC has specific editorial guidelines that apply during election periods.

"Because of this it would be inappropriate to feature political party leaders on entertainment programmes during this short election period, which does not allow for equal representation to be achieved."

The broadcaster said it would look to air the episode at a later date.