Allan Debenham tricked staff into believing he was documentary maker and said BBC would pay for his stay

A homeless man with a drinking problem who stayed at a country pub for two nights after claiming to be the documentary film-maker Louis Theroux has been given a community sentence.

Allan Debenham, 39, booked a room at the £70-a-night Duke of York, in Shepton Beauchamp in Somerset, claiming he was "Louis Theroux from the BBC". He gave staff a phone number for the BBC's finance department, which he said would pay.

Debenham later pretended to be Theroux's personal assistant when he rang down to the bar and asked them to put two bottles of wine on his room tab. Staff became suspicious when the supposed PA called again and asked for a further two bottles of sparkling wine and "some fags" to be taken to the room.

Pub staff phoned the BBC and realised they had been conned. The police were called, and it emerged that when Debenham had booked a taxi to take him to the pub, giving Theroux's name, he had said the driver may not recognise him because he had put on a bit of weight.

Debenham, 39, pleaded guilty this month to two charges of making a false representation. He was also convicted of assaulting a former partner.

Amanda Campbell, chair of the bench at South Somerset magistrates court, in Yeovil, told Debenham: "We consider the assault to be the most serious. However, we do think all these offences have the same root cause. We consider that the community can best be served by a sentence designed to rehabilitate.

"We heard today that you have engaged with the health and mental services, you have been to your doctor and you have seen Turning Point [a health provider specialising in substance misuse] and an independent alcohol worker. Taking all those things into consideration, we are going to give you a community order for 12 months with a supervision requirement."

Debenham was ordered to pay compensation of £165 to the pub and £14.70 to the taxi firm. He was told to pay his former partner £100 compensation, and was made the subject of a restraining order not to contact her for 12 months.