Barack Obama has criticised Republican presidential candidates for staying silent when a gay soldier was booed at an Orlando debate.

Stephen Hill, who is stationed in Iraq and spoke via a videolink, was booed for asking whether the candidates would reinstate the ban on openly gay troops.

The president, who was speaking an a Human Rights Campaign convention, said: “We don’t believe in the kind of smallness that says it’s okay for a stage full of political leaders – one of whom could end up being the president of the United States – being silent when an American soldier is booed.

“We don’t believe in that. We don’t believe in standing silent when that happens. We don’t believe in them being silent since.”

He added: “You want to be Commander-in-Chief? You can start by standing up for the men and women who wear the uniform of the United States, even when it’s not politically convenient.”

Mr Hill, who said he previously had to lie about himself to keep his job, asked the candidates: “Under one of your presidencies, do you intend to circumvent the progress that’s been made for gay and lesbian soldiers in the military?”

As the video finished, he was booed and heckled by audience members.

The candidates did not condemn the crowd’s behaviour and one, Rick Santorum, declared that he would bring back the ban.

Speaking last week, vice-president Joe Biden also attacked the Republican candidates.

Mr Biden, whose son served in Iraq, said: “Look, this kid risked his life, this kid was there for a year. And I, quite frankly, find it reprehensible.”