Disgraced former NSW police officer Adam Purcell has admitted tipping off the media and a state MP about a serial sex offender then lying about it to his superior officers.
He has admitted to telling a journalist he was not concerned about his superiors' requests not to talk to the media.
"Oh f*** off ... I'll talk to whoever I want to, you know," he said in a taped conversation.
But allegations that he warned a well-known Sydney rugby league player that police were investigating him have been dropped, a court has heard.
In 2007, the Police Integrity Commission (PIC) asked Purcell - then acting commander of the Eastern Suburbs Command - to give evidence at an investigation into the district's handling of an unrelated alleged rape in 2004.
After tapping Purcell's phone, bugging his house and hearing his evidence in the stand, police charged him with eight offences - including giving false evidence, misconduct in public office and perverting the course of justice - relating to matters that arose as part of the investigation.
But on Tuesday, as Purcell was about to face an eight-day committal hearing in Sydney's Downing Centre District Court, prosecutors agreed to a deal - he pleaded guilty to two charges and they dropped the other six.
Purcell, 47, pleaded guilty to one charge of misconduct in a public office and one charge of giving misleading evidence before the PIC.
In dropping the other charges, police cleared Purcell of allegations he had tipped off a well-known NRL player about a police investigation into him.
"(Purcell gave a witness) confidential information regarding a sexual assault that occurred on the fourth of October, 2006," Nicole Paul from the DPP told Magistrate Mark Buscombe.
"(At the PIC in April 2007) he gave evidence that did not disclose his conversations with a witness."
The lack of disclosure relates to Purcell telling the PIC he had not spoken to anyone about his being called to give evidence, despite being recorded telling a senior police officer colleague and friend that he would be two days earlier.
The charge of misconduct in public office relates to Purcell giving a Seven Network journalist an early tip-off about an alleged sex attack on two children, and then continuing to speak to the media about the case, breaching the NSW Police media policy.
He admits to giving several reporters and one Member of Parliament (MP) information he had been directly asked not to divulge and then lying about his conversations to his superiors.
"(The calls) make it clear that the offender intended to maintain a personal media relationship in respect of the investigation, which he had no intention of disclosing to the other officers," the police statement of fact read.
During one taped conversation with a journalist the offender said he was: "Completely at ease with the fact that he had divulged the information on the crime and expressed the opinion that it does not impact on the investigation at all," the facts read.
Purcell has been committed to be sentenced in the Downing Centre District Court on February 26.