Charities and opposition politicians have attacked a decision not to jail a man who downloaded child pornography, amid the prison overcrowding row.
Judge John Rogers QC suspended Derek Williams' sentence, saying he had to consider a Home Office request to jail only the most serious offenders.
The lord chancellor has denied claims by opposition MPs that the judiciary's discretion appeared to be influenced.
Williams, 46, of Blaenau Ffestiniog, Gwynedd, said he was "lucky to be out".
The pressure increased on Home Secretary John Reid when it emerged that Professor Rod Morgan, the head of the Youth Justice Board (YJB), has resigned.
Prof Morgan told BBC Two's Newsnight that "we're standing on the brink of a prisons crisis".
It came after Williams' six-month term of imprisonment was suspended for two years.
Williams was also ordered to register with the police as a sex offender for the next seven years and placed under supervision.
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."
Despite pleading guilty, Williams claims he was innocent and admitted the offences because he wanted to get home to his family.
Dame Mary Marsh, director and chief executive of the NSPCC, said the sentence on Williams was "unacceptable".
"The government needs to ensure that the intention behind the announcement is properly understood and fully thought through, and that children are not put at greater risk by placing offenders in the community rather than in jail," she said.
John Carr, of children's charity NCH, described the judge's decision as "deeply worrying".
"The judge should really think again... I don't know quite what he was thinking about if he thought that child pornography offences were not serious," he said.
Home Secretary John Reid and legal chiefs sent advice to judges and magistrates this week reminding them that only the most dangerous and persistent criminals should be jailed because of the pressure on prison spaces.
In sentencing Williams on Thursday, Judge Rogers, the senior judge on the north Wales circuit, told Mold Crown Court he had to consider "the current sentencing climate".
He said: "As of yesterday, I have to bear in mind a communication from the home secretary."
The judge said he had to consider the home secretary's request
He said the suspended term also took into account Williams' guilty plea and the time the case had taken to come to court.
On Thursday, Mr Reid said the government was in talks to buy two prison ships and use an RAF camp to ease jail overcrowding.
Shadow home secretary David Davis said Judge Rogers' sentence 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.
Liberal Democrat home affairs spokesman Nick Clegg said the case was an "inevitable domino effect of a government lurching about in blind panic trying to solve a prison overcrowding crisis of its own making".
He said: "By appearing to interfere with the discretion of the judiciary, John Reid is further undermining public confidence in a criminal justice system which is in total decay."
Elfyn Llwyd, Plaid Cymru MP for Meirionnydd Nant Conwy, said the home secretary should "get his tanks off the judges' lawns".
"I actually know the judge quite well. I'm a barrister myself and I have the very highest regard for him as do many other practitioners," he said.
"If you paint judges into a corner, then this is what's going to happen. It's political interference at its very worst."
But Lord Chancellor Lord Falconer said the advice had only reminded the courts of the sentencing guidelines.
"We make it absolutely clear that the guidelines prescribe that if somebody is dangerous, he should go to prison," he said.
"If you've got a real choice then as much as you possibly can, keep people out of prison, because it's not protecting the public and it may well be that their prospects of rehabilitation or stopping the offending are increased by being out of prison.
"And that's what the judge has decided here. It's plain that he's borne in mind the prison overcrowding problem."