Michael Collins was forced to flee when his 77-year-old victim fought back. Now, he has been convicted and will be punished with more than three years in jail.
Collins tried to rob retired bus driver Trevor Weston at a supermarket cash machine in Cardiff on February this year.
Weston had just used the ATM and was returning to his car when he was approached by Collins.
“Give me your money and card or I'll stab you," the attacker told him, armed with a pencil and covering his face.
But CCTV outside the Sainsbury's supermarket in Roath showed Weston fighting back, squaring up to Collins and punching him twice in the face.
“To deliberately target an obviously elderly gentleman alone at twilight is not only an aggravating feature but is also plainly a cowardly attack," prosecutor Timothy Evans told the court.
“Well, in this case the CCTV shows that this particular coward picked on the wrong man. He wanted the victim's cash. Instead he got a left hook."
Trevor Weston fights off Michael Collins during the attempted robbery outside Sainsbury's (South Wales Police/PA)
“Instead of giving in, Mr Weston spun around in the robber's arms and pushed him backwards, asking him: 'What did you say?'" Evans added.
“The defendant repeated his demand – 'give me your money and card or I'll stab you' – and started to walk towards him again."
“Instead of giving him money, Mr. Weston gave him a punch to the face to keep him away and squared up to him in a boxing stance with his fists up."
Evans said Collins was “obviously taken aback" and took a step back.
“It was at that point that Mr Weston could see that he was holding a black and yellow striped pencil in his right hand which he was holding out in front of him," the prosecutor said.
“That first defensive blow did not stop the defendant though in his attempt to rob Mr Weston. He started to move again towards him still holding the pencil out."
This particular mugger was persistent.
“That didn't put off the redoubtable Mr Weston. He punched his attacker again with his left fist to the face. This time a bit harder," he added.
“That second punch clearly surprised the defendant and it was then that he backed off and walked away towards Colchester Avenue."
Michael Collins was jailed for more than three years (South Wales Police/PA)
The court heard Weston then got into his car and left the scene.
“After this incident I went home. I sat down and ate breakfast," Weston said, in a victim personal statement.
“I was watching the TV and it suddenly dawned on me of what could have happened. I was very shaky. I think I was shocked."
But, that experience has impacted the way he gets cash out of the ATM.
“Looking back at this time I am thankful that nothing worse happened," he said. “I am now frightened to go back to Sainsbury's to withdraw money. I am now thinking I will have to change my daily routine."
Collins has a long history of offending, and was identified by police from CCTV and forensic examination of Weston's jacket revealed the defendant's DNA.
The attacker pleaded guilty at an earlier hearing to attempted robbery.
The court heard he has a total of 57 convictions involving 156 offenses, including shoplifting, assaulting police officers, battery, harassment and criminal damage.
Judge Richard Williams found Collins guilty and convicted him for 42 months.