A woman was killed as she drove out of a petrol station by two drivers racing at up to 70mph, a court has heard.
Jenna Miller, 30, was hit by an Audi A5 allegedly involved in a race with a VW Golf on a 30mph (50km/h) road in Barry, Vale of Glamorgan.
Cardiff Crown Court heard two cars were caught speeding on CCTV before the fatal crash on Cardiff Road.
Joseph Fettah, 19, of Rhoose, who was driving the Golf, denies one count of causing death by dangerous driving.
The Audi driver, Jamie Oaten, 23, of Barry, has admitted the same charge and will be sentenced at the conclusion of this trial.
Mrs Miller – a mother to two boys aged 10 and seven – had to be cut free from the wreckage on 27 September 2016 but died in hospital from “devastating injuries”.
Prosecutor Matthew Cobbe said
Mr Fettah’s VW Golf had stopped behind Oaten at traffic lights just before the crash.
The court heard the race started less than 500m from where the crash happened.
Mr Cobbe said: “One young man encouraged another young man to drive faster and faster and their concentration went from other road users to each other.
“Both men were more concerned about their race as opposed to the welfare of other road users and those around them.
“It was that impromptu race that caused the death of Jenna Miller. Both men share responsibility for her death.”
The jury was told a witness described the cars “flying past him” at more than 70mph (110km/h).
Mr Cobbe said: “Fettah says he was not driving dangerously that night and played no part in the tragedy that unfolded.”
The trial continues.