A man given unpaid work for assault has been jailed after breaching the order.
Gareth Niven, 26, previously admitted attacking David Baillie in St Andrews on February 13 2016.
He pleaded guilty to repeatedly punching and kicking Mr Baillie on the head during the incident at the Petheram roundabout.
Niven was placed on a community payback order with 180 hours of unpaid work in August last year.
But he returned to the dock at Dundee Sheriff Court after breaching the order.
According to solicitor Douglas Williams, Niven had been “in limbo” over a rape charge he was facing.
Niven, of Motray Crescent, St Andrews, was later found not guilty at the High Court in Edinburgh of raping a man in October 2015 near Matthews Foods on Dundee’s Gellatly Street.
Charges of lewd, indecent and libidinous practices were dropped before trial.
Mr Williams said he believed a tag, restricting Niven to staying in his home between certain hours, would be a suitable alternative to custody but Sheriff Alistair Carmichael said he had only one option.
He said: “I put you on a community payback order as an alternative to custody.
“I have no confidence that you would stick to a restriction of liberty order so as far as I am concerned there is no alternative to a custodial sentence.”
Niven was jailed for nine months.