A Labour MP has apologised after she was recorded branding a voter a “horrible racist” while campaigning for Britain to stay in the European Union.

Shadow Europe minister Pat Glass was in the village of Sawley in Derbyshire and was interviewed by BBC Radio Derby. After the interview had ended she was recorded saying: “The very first person I come to is a horrible racist. I’m never coming back to wherever this is.”

The BBC reported that the voter had denied being racist – but he had referred to a Polish family in the area who he thought were living on benefits. He is said to have described them as “spongers”.

This evening it was still not clear whether the voter had expressed overtly racist views or not. Nevertheless Conservative MP Maggie Throup, whose Erewash constituency includes Sawley, claimed that the remarks “clearly demonstrate just how out of touch Labour still are with a large proportion of British people.”

Ukip‘s Douglas Carswell also leapt on the comments, stating on Twitter: “Remain MP caught sneering at voter on campaign trail - they despise you and your views”.

But as rivals sought to capitalise on the remarks, others questioned whether the Labour MP had been badly treated by the BBC.

Labour sources suggested that Glass believed that her controversial comments were off-the-record and would not be broadcast. They came after the interviewer appeared to wrap up the segment by saying: “Okay, that’s great.”

The senior Guardian journalist Andrew Sparrow stated: “I’m slightly surprised that the BBC are broadcasting this comment. Glass clearly thought the broadcast interview was over… It is obvious that she thought she was off-the-record, and that she was just having a chat.”

However, Glass is not heard saying that her remark was off-the-record and the recorder was still running.

Glass has been taking a prominent role in Labour’s campaign for a Remain vote in the EU referendum. Alongside Alan Johnson, she introduced Jeremy Corbyn in his first major speech on the subject in April.

In a statement issued after the remarks became public, Glass said: “The comments I made were inappropriate and I regret them. Concerns about immigration are entirely valid and it’s important that politicians engage with them. I apologise to the people living in Sawley for any offence I have caused.

The episode has echoes of Gordon Brown infamously being caught during the 2010 election campaign branding Gillian Duffy a “bigoted woman” after she challenged him on immigration from Eastern Europe.