A teenager has appeared in court after two youths were robbed at gunpoint.
The attack happened in Holmfirth on September 9 last year.
The teens, aged 16 and 17, were riding on a scrambler bike when they were chased by a BMW before the occupants got out and demanded their belongings.
A 16-year-old boy, who cannot be named, appeared at Kirklees Magistrates’ Court in custody.
He faces two charges of robbery and a charge of possession of an imitation firearm, an airsoft gun, to cause or threaten violence.
Prosecutor Alex Bozman said that the incident happened at just before 1am when the victims were riding around the Holmfirth area.
While they were travelling along Dunford Road a BMW passed them at speed before turning around and chasing into Fearnley Lane, Mr Bozman said.
There three males allegedly got out and one threatened them that they would be shot unless they emptied out their pockets.
One of the victims was injured as he was forced to hand over his helmet, mobile phone and an Adidas bag containing other possessions.
Magistrates agreed to release the defendant on conditional bail.
These conditions include an electronically-monitored curfew at his home and a ban from contacting the two complainants as well as entering Holmfirth.