A man attempted to murder a schoolgirl by removing her seatbelt and deliberately crashing his car, a court has been told.
It allegedly happened after Lukasz Jarosz, 35, of Wilton, near Salisbury, discovered his wife had killed herself.
Mr Jarosz is on trial for the attempted murder of the youngster, who cannot be named. He denies the charge.
He admits a second charge of causing serious injury through dangerous driving, Bournemouth Crown Court heard.
Kerry Maylin, prosecuting, said the defendant had become hysterical after the "tragedy" of discovering his wife's body.
Miss Maylin said Mr Jarosz was driving on the A36 in the direction of Salisbury when he came off at the Kingsway Industrial Estate junction and drove at a railway bridge at an estimated speed of "no less than 40mph" in a zone with a 30mph limit.
She said: "It was at that stage Mr Jarosz undid the seat belts of himself and [the girl]."
The girl was trapped in the front passenger seat and had to be freed by firefighters.
The trial continues.