An Extended Supervision Order has been granted by the court to strictly monitor a repeat child sex offender who threatened to give "many people HIV, HEP C".
And the order will remain in place for seven years after she is released from jail in a bid to protect the community from her sexual "deviancy" and high risk of further serious offending.
Rory Francis was sentenced to nine years and four months in prison in 2010 for rape and other sexual offending against boys and girls in 2010.
Earlier indecent offending against boys in 2005 resulted in a sentence of one year and three months.
Francis had been diagnosed as HIV positive before the offending.
Francis now identifies as female and uses the name Laken McKay.
Earlier this year she was denied parole, but her most recent sentence ends in September and she will be released from prison.
The Parole Board ordered a number of conditions for McKay including GPS monitoring and a ban on entering any public place frequented by young people.
Those conditions would remain in place for six months after her September 12 release date.
However, the Department of Corrections applied for an Extended Supervision Order in a bid to enable strict monitoring of McKay for a longer period.
Corrections lawyer Jessica Blythe said the purpose of the order was to "protect members of the community".
She said McKay had a "pervasive" pattern of serious sexual offending and there was a "high risk" that she would commit further sex crimes.
Blythe outlined McKay's raft of sex offending against little boys and girls including indecent assault, rape and doing indecent acts with children under 12.
"There is ample evidence that Ms McKay has an intense drive or urge to commit a sexual offence," Blythe told the court.
As the submissions were made, McKay, wearing a grey prison tracksuit, sat still in the dock and stared at the floor.
"There is no evidence that Ms McKay's risk has diminished in light of her becoming a woman," said Blythe.
She added that McKay had been assessed as being in the moderate to high category for sexual violent reoffending and also had a similar score when tested for serious sexual deviancy.
McKay was assessed as having high degrees of impulsivity, poor emotional control and insight, offence planning, deviant sexual interests and, further, she had no real support in the community.
She said the court should be satisfied based on the evidence that McKay would - not might - commit further and similar sex offending in future.
She asked the court to grant an ESO for seven years to allow for adequate time for McKay to seek appropriate treatment and ensure she her risk of reoffending could be reduced.
If after seven years she still posed a risk, Corrections could seek a further order.
McKay could also apply for the order to be lifted during that time if she felt she had been properly rehabilitated.
Blythe said that while McKay had participated in a prison programme for sex offenders, she had made only "modest gains" and had difficulty applying any skills and strategies she learned.
When she was released, her lack of improvement led to reoffending - particularly as she turned to casual sexual encounters in a bid to find "affection".
McKay's lawyer told the court her client understood the case against her and the application for the order.
But she argued that the ESO should be granted for a shorter period of time and suggested it be imposed for five years.
"That can be extended, and imposed for quite some considerable amount of time if necessary," she said.
She said it was "much harder" for a respondent like McKay to seek the lifting of an ESO than it was for Corrections to ask for an extension.
Justice Cheryl Gywn agreed to grant the ESO.
She said McKay had a total of 20 sex offences to her name - all against children who were known to her.
For legal reasons the Herald cannot identify her relationship to the victims.
She was assessed as being at high risk of further similar offending and it was imperative the community was protected from her, Justice Gwyn said.
"I am satisfied Ms McKay's offending falls into the category of a pervasive pattern," she said.
"I am of the view that Ms McKay displays an intense drive to committing a relevant sexual offence."
McKay told a report writer that she didn't have a predilection to children, preferring transgender adults.
But an expert said she would seek to satisfy her sexual needs with whomever was available - regardless of their age or gender.
"The desire to offend against children thus persists," said Justice Gwyn.
"Ms McKay exhibits a proclivity to satisfy her own sexual needs.
"Her desire for affection that despite having an age-appropriate partner and being HIV positive, she offended against children.
"Her conduct shows a pattern or proclivity to offend against children in order to meet her own needs."
Justice Gwyn said McKay had limited capacity for self regulation and was resistant to being challenged about her behaviour.
McKay also showed limited responsibility over her offending.
Justice Gwyn said despite asking for her genitalia to be removed and to get a tattoo saying "no more" to remind her of her "commitment to no more victims", McKay did not display any meaningful understanding of the impact on her victims.
There was, effectively, a complete lack of regard for the safety of her victims.
Justice Gwyn said she was satisfied an ESO was needed.
She granted Corrections' application and ruled that the order be in place for seven years - effective from her prison release date.
LAKEN MCKAY - THE STORY SO FAR
In August last year the Herald revealed McKay had been released on parole and was living under the new identity.
The family of her most recent victim contacted the Herald after she was released, concerned her new identity meant the community was not aware of her past offending.
In October, McKay was recalled to prison after she breached her parole conditions.
She had been working as a prostitute for several weeks, taking cash and methamphetamine as payment.
Her parole conditions forbade her from any employment without express permission, and from using drugs.
From prison McKay wrote to the Herald saying she did not want to be back in the community and had asked to be kept in prison "behind a fence" for the rest of her life.
"So I wrote a letter to the chief executive of Corrections ... I said that I wanted to live in the compound in Christchurch ... which means I'll live there for the rest of my life - the community knows they are safe from me and I safe from them," she wrote in April last year.
"I also stated that if I were to be released from custody I would start working again as a prostitute and give as many people HIV and Hep C, which in my eyes makes me an immediate threat to the community."
The Herald first reported on McKay after she was released from prison and was living in Auckland under her new name.
She had been diagnosed as HIV positive before her sexual offending and the victim's family were concerned her new identity meant the community was not aware of her past offending.
"It's important to me that people know who he is," said an aunt of one child, who knows the offender as Rory Francis.
"It's like he's trying to hide his identity, who he is and what he has done.
"With this new identity no one knows what happened, and unless people know who he is they will not know about his crime and they have a right to know.
"I feel like he is trying to escape what happened, but we need to protect our children and the community - otherwise no one is the wiser."
Before she was recalled to prison, McKay told the Herald she was not a danger to the public.
"I know I'm not a risk to society any more," she said.
"I've been reformed."