Edmonton police insist they tried to find a 17-year-old homeless girl with HIV before making her name and picture public.

But they say they had to act quickly because they believed she was leaving the city.

"Information came in that there was a possibility that she may be leaving the city," Supt. Danielle Campbell said Wednesday. "We had to act on that information. We brought that information before the courts."

Police were looking for the girl after they received complaints from two men who claimed she failed to tell them she was HIV-positive before having unprotected sex with them.

The young woman was arrested in Edson, Alta., after police went public with her identity. She was charged with two counts of aggravated sexual assault and she can no longer be identified under the Youth Criminal Justice Act.

The decision to name the teen has been sharply criticized by HIV advocacy groups and legal experts who say police could have tried alternate ways of finding her before resorting to a measure that is considered a first in Canada.

Campbell said police tried to find her before releasing her identity.

"Beat constables that were familiar with her frequenting locations where she would be — we deployed those resources," Campbell said. "We had other resources looking for her."

Because the young woman is under the age of 18, police needed a court order to release her name and photo for the purpose of finding her. 

Campbell said the decision to seek the court order was made in consultation with the Crown Prosecutors' Office and Alberta Health Services.

Once the teen was charged, she could no longer be named. However, three days after her arrest, the girl's name was still on the police department website.

Campbell blamed a communications breakdown, which she said will not happen again. The information has since been removed.

CBC is still trying to get a copy of the court order which allowed police to release details of her identity.

The teen remains in custody after a youth court judge turned down her request for bail.