Sydney LGBTQI+ rights protesters will march along Oxford Street while the city's Mardi Gras is held elsewhere after NSW Health granted organisers an exemption from gathering restrictions.
The exemption means a court fight between NSW Police, who sought to stop Saturday's march, and the protesters will no longer go ahead.
Activist group Pride in Protest decided at the last minute to apply for an exemption to public health orders, approaching NSW Health Minister Brad Hazzard on Thursday afternoon.
Shortly before the court hearing was due to begin at midday on Friday, the group announced it had secured the exemption after agreeing on better contact tracing processes.
"This is a massive win for not only the right to protest but for the queer community to say that the fight against transphobia and homophobia cannot wait," the group said in a statement.
Earlier on Friday, the chief executive of the Sydney Mardi Gras said his organisation wasn't going to support the march because it could not condone protests in violation of NSW public health orders.
The march is due to take place on Saturday afternoon ahead of the official Gay and Lesbian Mardi Gras parade, which has been moved to the Sydney Cricket Ground due to COVID-19 issues.
About 10,000 people are expected at the Mardi Gras parade at the SCG.
"We've given every single float a 45-second dedicated spot on our broadcast to get their message across ... it's not just about walking around in fancy costumes, it's a social justice event," Mardi Gras chief executive Albert Kruger said.
"We want to make sure whatever event we put on, we can safely do so and confidently say our patrons coming to this event will be safe."
Mr Kruger also said revellers should consider attending ticketed events and afterparties or host gatherings of up to 50 people at home.
Protest organisers say the march down Oxford Street, in the inner city suburb of Darlinghurst, will follow the route of the original 1978 march.
NSW Police Assistant Commissioner Gelina Talbot said police would be out in force on Saturday across Oxford Street, Hyde Park and Moore Park to keep people safe.
Protest spokesperson Toby Walmsley said the police's plans were "onerous and unnecessary".
"Pride in Protest does not support police presence during Mardi Gras and will not accept police as the arbiters or either our community, our communities' health, or how we should fight for our rights," he said.
NSW Supreme Court Justice Peter Garling on Friday morning learned about the protest group's late approach to Mr Hazzard.
"Let's be frank about this," he told a lawyer for Pride in Protest representatives.
"Your clients were told during the course of the consultations with the police that they could, if they wish, apply for an exemption.
"They said they weren't prepared to do it ... they chose to do nothing about that until yesterday afternoon."