A Nottingham man was shot dead in a case of mistaken identity, a court has heard.
Marvyn Bradshaw, 22, was shot in the back of the head as he drove from The Sporting Chance pub in Top Valley.
Michael O'Brien, 23, from Aspley, Nottingham, denies committing murder on 30 August last year.
The jury heard the shooting happened after Mr O'Brien returned to The Sporting Chance with a shotgun after being refused admission.
Nottingham Crown Court heard Mr O'Brien went to the pub, where there was late-night drinking, with another man, Gary Salmon.
The jury was told the defendant was refused admission to the pub and was hit above his eye with either an ashtray or a bottle.
It was alleged he and Mr Salmon returned to Brooklyn Road where they had been earlier, collected a shotgun and returned to the pub where the shooting took place.
Marvyn Bradshaw was shot in the back of the head at close range and later died in hospital.
The jury were told Mr Salmon had never been caught.
The trial continues.