A man who downloaded child pornography to his computer has avoided jail after the home secretary asked judges to limit prison terms due to overcrowding.
Judge John Rogers QC gave Derek Williams, 46, of Blaenau Ffestiniog, Gwynedd, a suspended sentence.
The judge at Mold Crown Court said he was "bearing in mind" the home secretary's advice to only jail dangerous and persistent offenders.
Mr Williams, who is under supervision, said he was "lucky to be out".
He told BBC News: "Yes I am lucky to be out, but you cannot blame the judge for what he has done. His hands are tied."
"He was only doing his job," he added.
Judges and magistrates have been asked by Home Secretary John Reid and legal chiefs to jail only the most dangerous and persistent criminals.
In the letter sent on Wednesday to judges and magistrates, Mr Reid said the prison population was "currently running very close to capacity".
The judge considered the home secretary's request
It said custodial sentences should be reserved for "serious, persistent and violent offenders" and that alternatives should be used "where appropriate".
The Sentencing Guidelines Council recommends a custodial sentence should be the "starting point" for possession of child pornography.
But the council says the ages of the children, the seriousness of the images and whether the pictures are for "personal" use can mitigate the sentence.
Shadow home secretary David Davis said the decision was a result of the government's failure to tackle the prison crisis.
"If true, then we now have a situation where sentences are being dictated by the prison capacity and not the severity of the crime," he said.
"It looks like the consequences of the government's failure to address the lack of prison places is coming home to roost."
Plaid Cymru's parliamentary leader Elfyn Llwyd said he was "appalled".
"I am appalled that the Home Office says send these people down and on the other hand they say don't send them down."
But the Lord Chancellor, Lord Falconer, defended the decision and said the judge had been applying sentencing guidelines.
"If that was permissible under existing guidelines that is the correct decision for the judge to take," he said.
On Thursday, Mr Reid said the government was in talks to buy two prison ships and use an RAF camp to ease jail overcrowding.
Prison numbers are currently hovering near the 80,000 mark with just 2,000 new places due by the end of the year.
Mold Crown Court heard on Thursday that a total of 180 pornographic images - from level one to the more serious level four - were found on Williams' computer.
Prosecuting barrister John Philpotts said they were downloaded from 2001, but it was now accepted that the defendant did not buy the computer until May 2005, so the number of photographs before the court would be less.
Williams admitted 10 charges of making indecent photographs between November 2005 and May 2006. Three other charges which he denied were dropped.
His six-month prison sentence was suspended for two years.
Williams was also ordered to register with the police as a sex offender for the next seven years.
Judge Rogers, the senior judge on the North Wales circuit, said the suspended sentence also took into account Williams' guilty plea and the time the case had taken to come to court.
But he warned: "Make no mistake, if there is any repetition then you will go to prison."
A Home Office spokesman said Wednesday's statement did not change sentencing policy, but simply reminded judges of the "options available".
He added: "Public protection is our priority and there is absolutely no question that serious, persistent and violent offenders should not get a custodial sentence.
"Sentencing in individual cases is a matter for courts."