The detectives who charged a grand jury in the disappearance of William Tyrrell with child sex crimes were just doing their job and acted on a tip-off to Crime Stoppers, a court heard.
The State of NSW says William Bill Spedding was charged as part of a professional, careful investigation into allegations dating back to the 1980s.
When he was charged in 2015, Mr Spedding was also a person of interest in the case Tyrrell after the boy vanished from Kendall in September 2014.
Mr Spedding is suing the state, claiming the charges, which he was cleared of, were a malicious attempt by the police to gain leverage against him in the Tyrrell investigation.
The 70-year-old was accused of sexually assaulting two young children in 1987 in Sydney's south-west, despite being cleared by police at the time.
Spedding has never been charged as part of the Tyrrell investigation and denies any involvement.
The state barrister Adrian Williams, acting for the state, told the NSW Supreme Court detectives were just trying to do their job when they charged Mr Spedding.
Mr Williams said the allegations were renewed in a call to Crime Stoppers in January 2015.
This wasn't something that the police had unearthed to 'get' the plaintiff, he said.
He said that detectives took the matter seriously and would have been rightly criticised for dismissing the claims out of hand.
In the past, it was common for children to be ignored because they were inconvenient, according to Williams.
He told the court that the police are expected to thoroughly investigate such claims.
The process was a professional, careful, moderate process, according to Mr Williams.
A failed prosecution is not necessarily a malicious one. The barrister said the records of the allegations were real and extensive and were not manufactured by Strike Force Rosann detectives.
The court heard former top detective Gary Jubelin came into the Tyrrell investigation after Mr Spedding was identified as a suspect and a separate call to Crime Stoppers.
Mr Jubelin took an interest in the child sex allegations but did nothing to initiate or maintain the prosecution, Williams said.
He said that Jubeln's focus was the disappearance of William Tyrrell.
Mr Spedding has claimed that Mr Jubelin threatened to ruin him during an unrecorded interview in 2015.
Mr Jubelin and other detectives are expected to give evidence in the hearing before Justice Ian Harrison.