A former Sunday Mirror journalist from Greenwich has avoided jail after he handed himself in to police to confess to hacking the phone of a soap actress.

Graham Johnson, 46, admitted listening to between 10 and 30 voicemail messages of the unnamed star over an "intense but short" period in autumn 2001, which resulted in a story about allegations she was having an affair with a gangster.

The Old Bailey heard he was acting reluctantly under instruction from senior managers and although he did not know it was illegal, he realised it was wrong and "walked off the story".

The journalist, from Greenwich, was not under suspicion when he went to the Metropolitan Police voluntarily last year after a number of journalists at the Sunday Mirror were arrested.

He has since sent a letter to the solicitors of the actress to apologise for listening to her phone messages and using that information for a story.

His lawyer Avtar Bhatoa argued that Johnson's case was "truly unique" because no other journalist sentenced for hacking had come forward.

He highlighted the example of former News of the World and Sunday Mirror journalist Dan Evans, who gave evidence in the hacking trial of Forest Hill's Andy Coulson and was given a suspended prison sentence in July after he pleaded guilty to two charges of conspiring to hack phones.

Mr Bhatoa said: "Mr Evans only came clean after his collar was felt. Mr Johnson called the police himself and, unlike others, he never prevaricated."

Johnson was sentenced to two months in jail, suspended for a year, 100 hours of unpaid work and £300 prosecution costs.

Judge Brian Barker said the matter must have "weighed deeply" on his conscience for some time.

He said: "The public regard these sorts of offences - quite properly - very seriously. You are in a different category but the fact of the matter is you allowed yourself in 2001 to behave in this way.

"You could have refused but you did not. You involved yourself in an intense but short period of phone hacking. It is to your credit that you ceased fairly quickly and put that behind you.

"You were directed by others. This was a single offence. You ceased quickly and you regarded this as something of a grey area. This was some time ago. You reported yourself and it has weighed deeply on your conscience for the intervening period."

Johnson was investigations editor at the Sunday Mirror for six years after previously working at the now-defunct tabloid the News of the World from 1995 to 1997.

The court heard that unlike the "industrial-scale" hacking that went on at the NotW, Johnson had only engaged in the practice for three to seven days, accessing 10 to 30 messages a day.

Mr Bhatoa said: "He was told there was a story concerning a soap actress being involved with an underground figure and it was in the public interest. He was shown how to listen to voicemails and he - under instruction - undertook that task reluctantly.

"After a few days he stopped and walked off this story. He was not aware at the time he was committing an offence. This was a topic on which no training was given but he felt it was wrong and he stopped it.

"Twelve years later when he realised he had committed an offence he went to the police. He was never under pre-existing suspicion and he admitted what had happened."

The court heard that hacking expose journalist Nick Davies and the campaign group Hacked Off had sent in references ahead of the sentencing.

Hacked Off commended Johnson and appealed for the most lenient sentence possible to encourage others to come forward.