THE honesty of an undergraduate who hit another student on the head with a tyre iron in York city centre has enabled him to keep his freedom.

John Batchelor, prosecuting, said Tayyab Saleem, 22, drove up to the victim, screeched to a halt on the pavement at 3.30am in Kent Street, York, leapt out and swung a tyre iron at him.

The victim was treated at hospital.

When police searched Saleem's student accommodation they found cannabis worth £1,000 in street deals and £110 of crystal meth. He said he was holding all drugs for their owner.

Police found no evidence that he was a drug dealer.

Saleem's solicitor advocate Nicholas Leadbeater, said York St John University had allowed him to complete his business studies degree but had thrown him out of the student accommodation.

Saleem, now of Allerton Road, Bradford, pleaded guilty to possessing cannabis with intent to supply it to another person, possession of crystal meth with intent to supply it to another, carrying an offensive weapon and causing actual bodily harm.

He had no previous convictions.

The Recorder of York, Judge Sean Morris, told York Crown Court the only reason Saleem had been charged with possession with intent instead of a less serious charge was his confession he intended to give the drugs back to their owner.

"You are probably the most honest defendant I have come across when it comes to admitting guilt," he told Saleem.

"If all defendants were as honest as you are, there would be no waiting lists in the crimial justice system and they would get lesser sentences.

"You are not going to prison because of that and because of the delay. It would be inhuman."

Despite the confession, it had taken the police 19 months to put him before the courts and the waiting had been a punishment in itself, said the judge.

He passed a 20-month prison sentence suspended for 12 months on condition Saleem does 200 hours' unpaid work.

Mr Leadbeater said Saleem now works for in the family bakery but hoped to take a Masters in business studies and jail would impact on his family.

The offences had been out of character.