A man who punched a senior police officer before putting him in a headlock has narrowly escaped a jail sentence.

Magistrates told Lee James they should send him to prison for the 'reckless' attack, which occurred during a night of booze-fuelled disorder in which four other police officers were allegedly assaulted.

But they gave the 26-year-old credit for pleading guilty straight away to a charge of assaulting Inspector Gareth Edwards.

James also pleaded guilty to a public order offence.

His solicitor Jonathan David told Port Talbot Magistrates' Court yesterday that his client 'has an anger management problem when he's had too much to drink'.

David Roberts, prosecuting, said Insp Edwards was attacked after rushing to help a fellow officer at around 3.15am on Sunday.

He told the court that James, of Bryn Awel, Bryntirion, in Bridgend, was swearing and pointing aggressively at a Pc outside Cody's nightclub in Bridgend town centre and was told to stop by Insp Edwards.

'He lunged at the officer, punched him to the left side of the face and got him in a headlock,' said Mr Roberts.

'Both fell to the floor, where he continued to punch and kick him.'

He said Insp Edwards, who was in charge of the Bridgend sector that night, was left 'extremely shaken' and with a small graze on his face and blood on his shirt.

Mr David said James, who works and is hoping to buy a house with his girlfriend, 'has nothing against the police whatsoever'. He told the court he may have been provoked by Insp Edwards pushing him. 'But my client accepts it was his attitude that led to his arrest.'

Chairman of the magistrates David White sentenced James to 150 hours of community service, and ordered him to pay Insp Edwards £150 compensation and £40 court costs.