A convicted criminal who was last year jailed for five years managed to get himself freed from jail after studying law books while behind bars.

Mike Murphy, 51, had his sentence overturned at a re-trial on Friday at Croydon Crown Court after a judge had wrongly allowed a jury to be told of a conviction going back 20 years.

Mr Murphy, who at the time was living in Titchfield Road, Carshalton, but is now of no fixed address, was found guilty in February last year of possession of a shotgun with intent to cause fear of violence, and two counts of damaging property.

He had denied all the allegations, claiming he had been nowhere near the scene and that he had been mistakenly identified.

During his trial Judge John Tanzer ruled that a conviction for possession of a firearm 20 years ago should be made known to the jury. But the appeal court decided the offence was far too old and it should not have been revealed.

Barrister William Saunders started the ball rolling for an appeal as soon as Murphy arrived at Highdown Prison.

Mr Murphy began borrowing law books from the prison's library and realised he was in with a chance. Following last Friday's ruling he is now a free man.

He was originally arrested after an incident in Gloucester Road in July, 2004, when a shotgun was fired. Two cars were damaged and people in the nearby Two Brewers pub were frightened.

Mr Murphy did not give evidence in the second trial which ended on Friday with not-guilty verdicts on all three charges.

After the case finished, he said: "Justice at last. When I read up the law in jail I could see straight away something was wrong. The first jury should never have been told of that conviction. It had nothing to do with what I was facing."

Mr Murphy, who served 10 months inside before being released pending the second trial, is now considering making a claim against the police for perjury after he claims false evidence was given in court.