Undercover police officers posed as members of a large and powerful criminal gang in a bid to catch Daniel Morcombe’s accused killer, a court has heard.

Undercover police officers posed as criminal gang members in an elaborate bid to catch Daniel Morcombe’s accused killer, a court has heard.

Covert police officers on Wednesday revealed details of the four-and-a-half-month operation that led to Brett Peter Cowan’s arrest.

Cowan, 44, has pleaded not guilty in the Brisbane Supreme Court to murdering the Sunshine Coast schoolboy.

Cowan was arrested in August 2011, eight years after Daniel vanished from the side of a Sunshine Coast road.

The court has heard Cowan was arrested after allegedly confessing to undercover police that he killed the schoolboy.

An undercover officer from Queensland told the court he befriended Cowan on a flight to Perth in April 2011.

The policeman, who Cowan knew as Joe Emery, said he spent weeks building a rapport with his target.

He introduced Cowan to other undercover officers posing as members of a large and powerful criminal gang.

Cowan was involved in “scenarios” of illegal gang activity for which he was paid, the court heard.

They included collecting debts, bribing court officials and buying illegal firearms, drugs and even “blood diamonds” from Africa.

All were set-ups involving undercover officers, the court was told.

Cowan was entrusted with handling large sums of cash and was told he could earn $100,000 if he helped with a large drug transaction.

“I always wondered how the other side lived, and now I can find out for myself,” he said, according to an undercover officer who gave evidence on Wednesday.

“I found my calling. I found the job that I’ve been waiting for all these years.”

Earlier, a friend of Cowan’s rejected suggestions he told the accused where Daniel’s remains were.

Leslie McLean denied an unnamed third person had told him where the boy’s bones could be found and that he in turn told Cowan.

Defence barrister Angus Edwards put it to Mr McLean that he’d once accurately described to Cowan the site where Daniel’s remains were found.

“I suggest to you that you told him (Cowan) that someone else had told you where Daniel Morcombe’s bones could be located,” Mr Edwards said.

“Never,” Mr McLean replied.

The court was also told Mr McLean had spent time in prison in 1997 and while there met convicted pedophile Douglas Jackway.

Jackway has given evidence at Cowan’s trial, and denied any involvement in Daniel’s abduction and murder.

The trial continues.