A student was punched by two robbers who forced him to a cash machine and assaulted him when he gave them a false pin code.
Macauley Davies, 22, and Daniel Jacobs, 22, approached their victim in Cardiff city centre on April 27 and offered to sell him cocaine, but when he declined, they attacked him.
They then went through his pockets, took his phone and wallet and frogmarched him to a nearby cash machine, but the student gave them wrong pin codes before running away.
When police searched for CCTV footage of the attack, they discovered the defendants had attacked someone earlier in the evening in an assault caught on camera.
A sentencing hearing at Cardiff Crown Court on Monday heard student Kai Edwards had been drinking at the Queen’s Vaults pub in Westgate Street with friends but lost them and was on his own when Davies and Jacobs approached him shortly after midnight.
Sentencing, Recorder Greg Bull QC said: “This was a classic joint enterprise between the two of you with each watching the other’s back as the planned robbery took place.
“You were looking for a victim you knew you would be vulnerable, and he was just that; he was young, alone and drunk.”
Davies was sentenced to 51 months; imprisonment and Jacobs were sentenced to four years and 10 months.