Andrew Sandford, a staff nurse at Glasgow's Victoria Infirmary, was found to have 12,270 still and video indecent images of youngsters on a computer.
A judge told him at the High Court in Edinburgh: "The nature and detail of the conduct perpetrated against young children and babies which features in your collection of images is quite shocking."
Lord Turnbull told him that the use of the term indecent images "sanitises and disguises" what was truly involved.
The judge said he had to take into account the significant number of images of the most serious type found and the lengthy period over which they were downloaded.
He told Sandford he would have faced a five and a half year prison sentence but for his guilty plea.
Lord Turnbull said he took into account his lack of previous offending and that he had "a valuable and worthwhile occupation" for many years.
The court was told that Sandford is no longer on the nursing register.
Sandford, 37, was caught after Strathclyde Police received intelligence that he had accessed a child porn website from his former family home in Barrhead.
The geriatric ward nurse, of Scotstoun Street, Glasgow, told police that he may well have accessed child porn through "a chatroom type thing".
He said: "Folk post all sorts of things on it, political, comedy and porn. Some child porn."
The married nurse, who was detained by the police at his workplace, gave officers permission to take a laptop from his home address.
The haul of child porn was identified and was found to have been downloaded between November 2006 and September last year.
Advocate depute Alison Di Rollo said: "Police officers have reported that this case involves some of the worst material they have ever seen."
She said it included images at the most extreme end of the scale used to grade such material.
"The overall range and nature of the images shows a predilection for young girls," said the advocate depute.





