Racial profiling did not contribute to the arrest of a former immigration detainee who was wrongfully charged with sex assault in a case of mistaken identity, a Victoria Police commander insists.
The man was arrested on Thursday after a woman was allegedly assaulted and another person allegedly stalked in the suburb of Richmond in Melbourne's east.
He faced the Melbourne Magistrates Court on Thursday and was remanded in custody before police realised their mistake.
The man was then called back and a magistrate struck out charges against him.
Victoria Police Commander Mark Galliot told ABC Radio the arrest was prompted by a description of the actual attacker which matched the former detainee based on height, age and ethnicity.
When asked whether it was racial profiling, Mr Galliot replied "not at all" and said the force had apologised.
"Based on the evidence and the descriptions we had at that time there was grounds for the arrest, they look very much alike and very similar," he said.
"Based on, as well with the GPS data, (this) gave the investigators enough to satisfy themselves this was the offender."
On Friday, a 55-year-old man from Kew was charged with sexual assault, stalking and unlawful assault over the Richmond incidents.
The man allegedly approached a woman as she was walking from her car on Victoria St on Tuesday.
The woman then went into a gym and the 55-year-old crossed the street, police alleged.
A few minutes later, he allegedly sexually assaulted another woman outside a licensed premises.
The man was granted bail to front Melbourne Magistrates Court on May 16.
Police on Friday said he was aged 54, before they corrected his age to 55.
The man who was wrongly arrested was among detainees released following a High Court decision in November, which overturned 20 years of legal precedent to rule indefinite detention unlawful when there was no prospect of resettlement.
Almost 150 people were released after the decision, which sparked fierce political debate.
More than two dozen have been arrested since.
The arrest happened in the days leading up to a crucial by-election in the seat of Dunkley in Melbourne's southeast following the death of MP Peta Murphy.
Before the identity bungle was revealed, Deputy Liberal Leader Sussan Ley wrote a post on social media site X urging people to vote against Labor "if you do not want to see Australian women being assaulted by foreign criminals".
As of early Friday afternoon the post remained online, sparking condemnation from Prime Minister Anthony Albanese and Education Minister Jason Clare.
"Sussan, if Peta was still alive today, she'd be disgusted with you and that tweet that you put out yesterday," Mr Clare said on Seven's Sunrise program.
"Police have withdrawn the charges, and you should delete that tweet."
Ms Ley said she would not take instructions from Mr Clare and would not take a "backwards step" on her position against the detainees' release.