A father-of-two died after he was beaten by a gang armed with baseball bats, a court heard.

Victim Gary Rae, 40, was attacked because William Devall, 19, thought that his 17-year-old "on-off" girlfriend was sleeping with Mr Rae, aged 40, it is alleged.

It is claimed that Devall boasted he was going to kill Mr Rae and "make him look like a cabbage".

He is also said to have posed with a baseball bat for a mobile picture taken at a party shortly before the attack.

Mr Rae, 40, died from horrific injuries inflicted outside his flat above a hairdressers' shop in High Street, Hailsham, last May.

He was allegedly hit over the head by Devall from behind with a baseball bat after he went to investigate violent banging on his front door.

Mr Rae's face, ribs, shoulder and thigh were all severely fractured after Devall and five other teenagers allegedly attacked him.

It is claimed he was beaten with two baseball bats and punched and kicked as he lay defenceless on the ground.

He died from abdominal bleeding caused by injuries to a kidney and his liver, Hove Crown Court heard yesterday.

He was rushed to Eastbourne District General Hospital within minutes of the attack but doctors were unable to save him.

Paul Lewis, QC, prosecuting, said: "It is the Crown's case that the defendants were responsible for the attack on Mr Rae.

Acting together they went to his home with the intention of inflicting serious violence on him.

"Two of them armed themselves with baseball bats which were used to strike their victim to the head and body with catastrophic and fatal results.

"Fists and feet were also used in a cowardly attack on an unarmed man. He had little prospect of being able to defend himself against such organised and determined violence."

Mr Lewis said Mr Rae was divorced and was sharing the flat above a hairdressers in High Street, Hailsham, with a lodger. The flat was used as a place to drink and smoke cannabis by local teenagers.

One of the teenagers who went there was a 17-year-old girl who had been having an on-off relationship with Devall for two years. Mr Lewis alleged that Devall was violent and aggressive towards the girl and had been convicted of causing her actual bodily harm in 2004.

He said: "They had apparently split up a few days before the killing but Devall was still jealous and possessive of her.

"She and a 16-year-old friend visited Mr Rae at his flat on May 27. She met Devall as she walked home in the early hours.

"He began abusing her, saying he knew she had been to the flat. He started punching and kicking her. He was obviously jealous and angry about where she had been."

Devall, 18, of Meadow Road, Hailsham, denies murder but admits manslaughter on the grounds of diminished responsibility.

Shane Challice, 19, of South Road, Hailsham, and Jason Jackson, 18, of Albert Road, Polegate, both deny murder.

One juvenile denies murder but admits manslaughter on the grounds of diminshed responsibilty. Two juveniles also deny murder.

The trial continues.