David Iggo admits possessing 500,000 indecent images of children
A man has admitted possessing almost 500,000 indecent images of children - many at the worst levels of depravity.
David Iggo, 58, was arrested in front of colleagues at the Scottish Maritime Museum in Irvine after police raided his home in nearby Kilwinning.
He admitted downloading indecent images, possessing extreme pornography and breaching bail conditions.
At Kilmarnock Sheriff Court, sentence on Iggo was deferred for reports and he was remanded in custody.
The court heard how the former chief officer in the Merchant Navy had been working as a technical supervisor at the Maritime Museum when he was caught.
When police first searched his home, Iggo admitted having illegal images and told officers: "There's going to be stuff. I really don't like talking about it, to be honest."
The court was told that Iggo had shared material with others, with some files tagged "young rape" and "child erotica".
About 22,000 of the pictures were described in court as being at the worst levels of depravity.
After being charged and bailed on the condition that he had no devices capable of internet access, police from a sex offender monitoring team called at Iggo's home and found a laptop computer.
He told officers: "I may as well tell you now, they'll find more images like they found last time."
Forensic experts discovered more illegal pictures and web searches including the phrases "prison sentences for child porn", "sex offender treatment in prison" and "file erase software".
Iggo admitted downloading indecent images, possessing extreme pornography and breaching bail conditions banning him from the internet between November 2010 and November 2013.
He has since lost his job at the Scottish Maritime Museum.