BBC editors have defended allowing online readers to debate whether gays in Uganda should be executed, saying they accepted it was a “challenging question”.

The discussion, on the broadcaster’s Have Your Say feature, asked: “Should homosexuals face execution?”

The debate centres on Uganda, where an anti-gay bill is passing through parliament. It would impose execution or life imprisonment on gays, its sponsor David Bahati MP says.

Some commentators on the site, from both the UK and Africa, had agreed with the country’s proposed law.

It was closed at around 4pm this afternoon after provoking a storm of anger on Twitter.

A number of readers emailed PinkNews.co.uk to complain that the question was offensive, arguing that readers would not be asked to debate the extermination of Jews in World War II.

On Twitter, users attacked the BBC for allowing the debate to be held and several claimed to have reported the broadcaster to police for “hate crimes”.

By way of comment, a BBC press officer cited a blog written by World Service Africa Have Your Say editor David Stead.

He said that editors of the programme thought “long and hard” about posing the question and added it prompted “a lot of internal debate”.

Stead wrote: “We agree that it is a stark and challenging question, but think that it accurately focuses on and illustrates the real issue at stake.

“If Uganda’s democratically elected MPs vote to proceed with the Anti-Homosexuality Bill this week they will bring onto the statute book legislation that could condemn people to death for some homosexual activities.

“We published it alongside clear explanatory text which gave the context of the bill itself. And as we said at the top of our debate page, we accept it is a stark and disturbing question. But this is the reality behind the bill.

“This issue has already sparked much debate around the world and understandably led to us receiving many emails and texts. We have sought to moderate these rigorously while at the same time trying to reflect the varied and hugely diverse views about homosexuality in Africa.”

Meanwhile, Liberal Democrat MP Lynne Featherstone has demanded an apology from the BBC for allowing readers to debate the topic.

Featherstone, the party’s youth and equality spokeswoman, said she had written to the Director General to demand action on the topic.

She said: “I would be the first person to stand up for open debate and free speech, but any conversation that starts ‘should homosexuals face execution’ is completely skewed and unacceptable in this forum.

“Suggesting that the state-sponsored murder of gay people is OK as a legitimate topic for debate is deeply offensive. The BBC are only fanning the flames of hatred as many of the comments demonstrate. They must act and apologise for their gross insensitivity.”