A Worksop man admitted lashing out with a crowbar in a fight after he was shown CCTV of it five months later, a court heard.
CCTV operators watched Jacob Smith chase a man into a Cheapside shop doorway and strike him on the back, at 3pm, on July 29, last year.
He was arrested by police in his transit van on Lincoln Street, shortly afterwards.
Prosecutor Robert Carr said: “He appeared to be sweating. He said he was defending himself and that someone had leaned through his van window and punched him.
“He asked officers: “What would you do?””
His victim received a wound on the upper right hand side of his back, but wouldn’t confirm that Smith was the culprit.
“He said he fell on a railing,” said Mr Carr. “Hospital staff said it was more likely he was hit with something.”
Smith, 29, of Pelham Street, admitted assault occasioning actual bodily harm and possession of an offensive weapon, when he appeared at Mansfield Magistrates Court, on Friday, after initially denying the charges on January 8.
He was last in court for a driving offence in 2015, but had a previous conviction for possessing a weapon in 2011, for which he received a community order at Chesterfield Magistrates Court.
And in May 2013 he was given a suspended sentence, which was later activated when he was convicted of theft.
James Gray, mitigating, said Smith pulled up outside the shop and was approached by his victim, who produced a needle.
Smith hit him and there was an exchange of blows.
He took hold of a small crowbar which he carried in the van for his work as a roofer and hit the man.
“There hasn’t been an incident since,” said Mr Gray. “Mr Smith has seen the other man and there has been no ongoing problem.
“It’s an unusual case because the crown’s case is founded on CCTV. There was no complaint from the other male.”
He said Smith, a father of four, was currently unemployed and not receiving benefits.
Magistrates said they didn’t have sufficient sentencing powers to deal with him, and gave him unconditional bail to appear Nottingham Crown Court, on March 16.