A judge praised two Good Samaritans who fought off a robber armed with a syringe as he tried to snatch a handbag from a vulnerable victim.
Jason Livesey was punched in the face by one of the women after he dragged a 63-year-old woman to the ground and pulled her along the floor.
The two women then chased him into an alleyway where he was caught hiding behind wheelie bins.
Both women were commended by a judge who sentenced Livesey to six years in prison over the attack on Infirmary Street in Leeds city centre.
Judge Tom Bayliss QC said: "This was a violent and sustained attempt to rob what must have appeared to be a vulnerable woman in the centre of Leeds.
"It was thwarted because of the bravery of two women who came to her aid."
Read more: Violent shoplifter bit police officer and security guard
Leeds Crown Court heard Livesey approached the victim just before 6am on February 14 this year as she waited for a bus to work.
Livesey was holding a syringe close to his chest in order to intimidate the woman as he approached her.
Vincent Blake-Barnard, prosecuting, said the woman, who walks with the aid of a stick, asked him to go away but he grabbed hold of her handbag.
The woman refused to let go and was dragged to the ground and pulled along by Livesey.
Her walking stick broke into three pieces and she screamed for help.
The screams were heard by two women who were on their way to work.
One of the women picked up a piece of the walking stick and used it to try to push Livesey away.
The second woman grabbed hold of his arm.
Livesey said to one of the women: "Get the **** off me or I will punch you in the face."
She replied "I don't ******* think so" and then punched Livesey in the face.
The 36-year-old let go of the bag and ran to an alleyway which had a dead end.
Police were contacted and the women stood at the end of the alleyway watching Livesey until officers arrived.
He was found hiding behind wheelie bins.
Read more: Teen burglar sold jewellery and valuables from Leeds house raids
Livesey pleaded guilty to attempted robbery.
The victim suffered grazing to her hands, bruising to her wrists and was unable to walk for days after the incident.
In a victim statement, which was read to the court on her behalf, she said she was frightened and feared for her life.
The incident has left her scared to leave her home.
She said: "If I did not have to, I would never leave my house again.
"I have never been as scared.
"I struggle with crowds and bus queues."
Imran Khan, mitigating, said Livesey committed the offence as he was desperate to buy heroin.
Mr Khan said Livesey had been held as a modern day slave in the Shrewsbury area by criminals he had owed a drug debt to.
The court heard he had managed to escape and went to live in York where he was receiving treatment for drug addiction.
Sentencing Livesey, the judge said: "In those two women you met your match.
"I commend their public spirit."
Livesey shook his head as he left the dock after being sentenced and slammed a door behind him on his way to the cells.