Elijah Nouvelage / Reuters The theme of San Francisco's Pride parade this year is "For Racial and Economic Justice," but community groups say an increased police presence doesn't reflect that theme. Above, people march in last year's parade in the city.

SAN FRANCISCO -- Black Lives Matter and other community groups abruptly withdrew on Friday from San Francisco's LGBT Pride parade because they disapprove of the city increasing police presence at the event.

Parade organizers and San Francisco police announced stepped-up security measures for Sunday's parade in downtown San Francisco in response to the mass shooting last week that killed 49 people at a gay nightclub in Orlando. There will be more cops on patrol, and spectators must pass through metal detectors. Police have advised attendees to prepare for delays at the entrance.

In response, Black Lives Matter officials decided they'd no longer participate as organizational grand marshal for the parade, whose theme is "For Racial and Economic Justice."

“As queer people of color, we are disproportionately targeted by both vigilante and police violence. We know first hand that increasing the police presence at Pride does not increase safety for all people," said BLM member Malkia Cyril in a statement. "Militarizing these events increases the potential for harm to our communities and we hope in the future SF Pride will consider community-centered approaches to security at pride events.”

The announcement showed the difficulties of balancing safety with an inclusive atmosphere for groups who have often been threatened by law enforcement.

The San Francisco police department has been embroiled in controversy over its officers fatally shooting African-Americans, as well as a scandal involving officers exchanging racist text messages.

Janetta Johnson, executive director of TGI Justice Project, a group for trans, intersex and gender-nonconforming people, also bowed out as the grand marshal for the parade.

“While I am thankful for this honor, and grateful to Pride for bringing our work to the front this year, the decision to add more police to Pride does not make me, or my community, more safe," Johnson said in a statement.

A sex workers advocacy group that was slated to receive an award at the parade on Sunday had a similar criticism.

"These policies do not reflect the theme of racial and economic justice which we sought to march under proudly," St. James Infirmary Executive Director Stephany Ashley said in a statement.

Parade organizers did not immediately respond to HuffPost's requests for comment.