A teenage girl attacked a man in the street then used her mobile phone to film her friend beating him to death, a court heard.
Mark Roberts, 35, had been walking home alone following a night out with friends in Weston-super-Mare, Somerset in October last year.
Bristol Crown Court heard four teenagers, two girls and two boys aged between 15 and 17, spotted Mr Roberts as he made his way through a park and approached him.
Mr Roberts walked with one of the teenagers, Ryan Sheppard, now 18, for a short distance then said he was "going home" and suggested the group do the same, a jury was told.
Sheppard responded by hitting Mr Roberts to the floor before one of the girls, now aged 16 and who cannot be named for legal reasons, allegedly ran up to him and punched him twice.
The girl then took out her iPhone and began filming as Sheppard returned to kick and stamp on Mr Roberts and repeatedly bang his head on the pavement, jurors heard.
She filmed for around 90 seconds before the group walked away from Mr Roberts - who was left lying unconscious in a pool of blood following the "ugly and sustained attack", the court was told.
Residents called paramedics and Mr Roberts, who suffered a cardiac arrest, was taken to Weston General Hospital, where he died 36 hours later.
The jury heard that as doctors battled to save Mr Roberts' life, the girl watched the video of the attack with Sheppard and others.
Police later arrested Sheppard, of Weston-super-Mare, and the girl, of Bristol, and they were charged with Mr Roberts' murder.
Sheppard later pleaded guilty to the charge but the girl denies it and any involvement in the attack on Mr Roberts, prosecutor Adam Vaitilingam QC said.
"The prosecution's case is that she participated in this unlawful killing in two ways," Mr Vaitilingam told the jury.
"Firstly, by punching Mark Roberts. Her use of violence was minor compared to that of Ryan Sheppard but if you find that she used violence against Mark Roberts - something she denies - the prosecution say this was a joint attack for which she carried joint responsibility.
"Secondly, she admits videoing part of Ryan Sheppard's assault on her mobile phone, at a time when it was obvious to her - as she told the police in interview - that he was trying to inflict serious injury on Mark Roberts.
"The prosecution say that her decision to video the assault was a clear encouragement to Sheppard as he attacked Mark Roberts and makes her criminally responsible, alongside Sheppard, for his death."
Mr Vaitilingam said Mr Roberts spent the evening of October 11 last year drinking "a lot of alcohol" with friends at the Devonshire Road Social Club.
Earlier that night, the girl had taken the train from Bristol and arrived at Weston-super-Mare at 7.30pm to meet an old schoolfriend, who also cannot be named.
The two girls, both then aged 15, met Sheppard, then 17, and walked through town before going to a house to drink alcohol together at 9pm, Mr Vaitilingam said.
At 11.30pm, the group headed out to meet another friend, a 15-year-old boy.
Residents spotted the defendant and Sheppard running over cars in Baildon Road in the town, an act the girl later admitted and described as "monster trucking".
Mr Roberts left the social club just after midnight and was approached by the group as they walked through a park.
The defendant's schoolfriend, in a police interview played to the jury, said Sheppard walked with Mr Roberts and asked him for a cigarette and to take him to a pub.
"He told Ryan to shut up, he said 'I'm going home, now go home yourself'," the girl said.
"All I saw was Ryan hit the guy. (The defendant) was the closest to Ryan. The guy was spinning, he fell on the floor.
"(The defendant) ran up to the guy and hit him twice. Then they walked off. They stopped at the corner and she said 'He's still down'.
"They then ran back up and he started hitting him, that poor guy. I didn't know where to look because it was quite bad.
"He hit him a few more times and then we all walked off. He (Sheppard) said 'Respect to (the defendant) - she gave him two punches'."
After the assault, Sheppard took a tobacco tin from Mr Roberts' pocket and threw it across the road, where it was later found by police.
The jury was told that as Sheppard said "respect" to the defendant, they bumped fists. They then returned to Sheppard's home.
"(The defendant) showed off the video of the attack on Mark Roberts that she had filmed on her iPhone," Mr Vaitilingam said.
"A 13-year-old girl at the house saw [the defendant] playing the video of the attack and watching it with others. She was also showing off about being in the fight.
"The 13-year-old said that in (the defendant's) words, she had 'full on' punched Mark Roberts. She showed her knuckles and they were red, like she had hit something."
Mr Roberts was taken to intensive care at Weston General Hospital, where he was declared dead at midday on October 13.
The girl later deleted the video clip of the attack on Mr Roberts from her mobile phone and police have not been able to recover it, Mr Vaitilingam said.
Home Office pathologist Dr Huw White carried out a post-mortem examination on Mr Roberts.
"He found bruising and abrasion to the left side of the forehead and above the right ear, a fracture of the nose with bruising of both eyes, and abrasions across the face, with lacerations to the lower lip and beneath the chin," Mr Vaitilingam said.
"The cause of death was the combined effect of blunt force impacts to the head and face together with heavy consumption of alcohol."
Forensic scientists also found bruising and a partial shoeprint - matching footwear recovered from Sheppard - on Mr Roberts' forehead.
Mr Roberts' blood was found on Sheppard's clothing, on his trainer and elbow and also on the cuff of a coat worn by the defendant that evening.
After her arrest, the girl initially refused to comment but later provided a statement denying any involvement in the attack.
"Ryan hit him in the jaw," the girl's statement said. "I tried pulling Ryan off but I couldn't. Ryan started banging Mark's head on the floor and punching him to the body and face.
"Ryan stopped, he told me to video it. I was scared of Ryan so I did because I didn't want him to do something like that to me.
"I filmed for a minute and a half, Ryan hitting Mark on the floor saying aggressive things to him. Mark was saying and doing nothing."
The girl claimed blood on her cuff was due to Sheppard telling her to wipe his shoe, the jury heard.
The trial, in front of Judge Neil Ford QC, the Recorder of Bristol, is expected to last up to 10 days.