A CITY council security guard stole seven tablet computers from the authority while doing his rounds at night, York magistrates heard.

Mark James passed the items on to his daughter’s partner who sold them for him on eBay, said Katy Varlow, prosecuting.

But the sales led to City of York Council investigators quickly tracking down their stolen items and James, 49, was arrested.

He told police he had no idea why he snatched the Galaxy S tablets which together were worth £2,100.

His solicitor John Ratcliff said: “A moment of madness, that is exactly what it is. He also recalls being completely stupid and that sums it up nicely as well.”

James had been on his rounds checking the property when he went into an office to close an open window. On his way back out of the room, he had seen the tablets packed in boxes on a desk and taken them.

When he got home, he had panicked, didn’t know what to do and eventually his daughter’s partner offered to sell them for him on eBay.

James, 49, of Charles Street, Selby, pleaded guilty to theft by an employee committed between March 20 and April 25. He was ordered to do 200 hours' unpaid work, pay £150 compensation to the council and £180 court costs.

Mr Ratcliff said he had resigned from his job following his arrest.

At the time, he had debts of £58,000 and needed money. All the money from the eBay sales had gone into his bank account and he had spent it on his day to day expenses. He did not live extravagantly.

He was paying off his debts under a voluntary agreement.

Mrs Varlow said three of the tablets had been recovered and had received compensation from James' daughter's partner, who had been cautioned. Four of the computers are still missing.

Mr Ratcliff said when he heard the partner had been arrested, James had handed himself in and told the police he was the man they were after.

He was genuinely ashamed of what he had done.