SF Pride relented and Mayor London Breed and the SFPD were able to reach an acceptable compromise Thursday about the banning of police uniforms in the Pride Parade — just in time for the Pride Flag raising at City Hall.

The mayor, who neither wanted to look like less of an ally to the city's LGBTQ community nor less of an ally to the police department, took the side of the police last week in joining their boycott of the SF Pride Parade. The SFPD, along with the fire department, declared they would not march in the parade following a decision not to allow them to march as they traditionally do — with LGBTQ members of the force and allies marching in a parade contingent in uniform. (New York Pride made a similar decision two years ago, although they banned police from their parade altogether.)

Last week, SF Pride suggested that a compromise was likely in the works.

Breed's decision drew the ire of LGBTQ groups in the city, including the Transgender District, which declared last week that its members would not take part in any city-sponsored Pride event, in protest of the mayor.

One of those events was the annual raising of the Pride Flag at City Hall to kick off Pride Month, which was scheduled for today.

As the Chronicle reports, Breed was able to announce the compromise between the SFPD and SF Pride at the event, though it's not clear if the Transgender District or any other LGBTQ groups intending to protest were present.

According to a statement from Mayor London Breed’s office, this is the compromise: Command staff will march in the parade without weapons, in dress uniforms; "fewer than 10" officers in uniforms with weapons will march with them, "in support"; and a third group of SFPD officers will march in civilian clothes or wearing SFPD-branded polos.

SF Pride had previously stated that LGBTQ officers and others on the force were free to march in the parade and identify themselves as SFPD, but they were asked to wear SFPD t-shirts or some other clothing that was not a full uniform. This is in order to reduce the harm or psychological trauma caused by the sight of uniformed police for marginalized communities.

"This year we need everybody to pull together," said Suzanne Ford, interim executive director of SF Pride, in a statement. "This is the year to ask what can you do for San Francisco Pride. We need everyone to come together to have the celebration this City deserves."

In an official statement today in connection with the flag-raising, Breed said, "Here in San Francisco, we embrace our diverse communities to ensure that everyone can live freely as who they are. While other states attack the rights of LGBTQ individuals, here in San Francisco, we fly the Pride Flag proudly to celebrate the history and honor the accomplishments of this community. Today reflects and the entire month of June reflects the strength of the LGBTQ community and our city’s commitment to LGBTQ rights and equality."

Others on hand for the flag-raising included gay SF Supervisor Rafael Mandelman, state Senator Scott Wiener, and newly appointed gay Supervisor Matt Dorsey.

Also, SFFD Chief Jeanine Nicholson, who is the fire department's first openly LGBTQ chief.

"Pride is about how we as LGBTQ people got together decades ago to save our own lives," Nicholson said. "It began as a movement to free ourselves from discrimination, violence, and exclusion. And we all stand on the shoulders of those brave souls who spoke up and out. Today it is about inclusion, and the dignity to be who and how we are in the world without fear. We are stronger together."

Nicholson added, "In 1991, Pride was where I was recruited by an LGBTQ member of the San Francisco Fire Department, and now I am so proud to be the Chief of that same department."

Related: Breed Joins Police, Fire Department in Boycotting Pride Parade Over Ban on Police Marching in Uniform