A teaching assistant has described to a jury the moment when the school minibus she was driving was shot at by a gunman in broad daylight.

Denise Smythe, who works at Buttershaw Business and Enterprise College, was dropping pupils off when she heard a "ping" on the driver's window.

"I turned round to the boys that were on the bus with me and said have we been shot at?" said Mrs Smythe. "They said yes with a BB gun'."

Mrs Smythe told Bradford Crown Court that only ten minutes before the incident on Buttershaw Drive she had closed the driver's door window.

"Afterwards I thought if that pellet had hit me in the temple I could have lost control of the minibus and probably injured or killed the children on the bus," she said.

The court heard that no damage was caused to the window in the incident.

Gary Marshman, 24, of Westcombe Court, Wyke, has pleaded not guilty to a charge of possessing an imitation firearm with intent to cause fear of violence on July 9.

Prosecutor Andrew Conboy showed the jury the black plastic handgun which Marshman was carrying with him as he walked the two and a half miles from his home to his mother's address in Buttershaw Drive.

Mr Conboy alleged that the handgun, which fires plastic ball bearings from a magazine, had the appearance of being a firearm.

Marshman is said to have been aiming the handgun at motorists and houses on route to his mother's home.

The police were alerted after Marshman was seen by care assistant Alison Firth and a colleague as he walked along Abb Scott Lane.

PC Phillip Chappell, who was in plain clothes with two colleagues, told the court they received a radio message just after midday about a man with handgun.

The officers, who were in an unmarked car, found Marshman walking along Reevy Road West.

"I saw the male with the gun in his hand and he was pointing it at houses across the road and pointing it at members of the public," said PC Chappell.

The officer said he saw Marshman point the handgun towards a BMW car, which sped off, before aiming the gun at the school minibus.

PC Chappell said they were in fear for the children on the bus and he described how he and one of his colleagues got out of the car to warn people in the area about the presence of the gunman.

The officer said Marshman at that stage realised they were police officers and he saw him put the gun into his own mouth.

The jury heard that a police armed response unit was deployed to deal with the situation and Marshman was eventually detained in a garden after throwing the handgun on the ground.

During a police interview Marshman said he had no intention of scaring anyone and claimed he was just "messing about".

He admitted shooting at the school minibus, but said the people in it would have realised it was not a real gun.

The trial continues.