Organizers of festivals in San Francisco have long complained they are hostage to the whims of the Police Department. The department has final say on whether they can get a permit to sell alcohol and also dictates how many off-duty officers the festival must hire — a number the organizers say is arbitrary and comes late in the process.

“It’s a running joke: ‘How much is SFPD extorting you for this event?’” said longtime event organizer Syd Gris. “It’s just known you are at their mercy. You have to say yes. And the police will do whatever they want.”

Supervisors David Campos and Mark Farrell will introduce legislation Tuesday that seeks to impose a semblance of uniformity on the process — and keep street festivals, block parties and music events in the city.

“We want to have clear guidelines, more transparency, in a way that doesn’t hurt these festivals,” Campos said. “As a gay man who in many respects came to San Francisco because of its night life and entertainment, I think it’s important to protect that side of our city.”

After more than a year of negotiations, the legislation is moving forward with the backing of the Police Department and event organizers.

It requires organizers to submit an application to the district police captain 125 days before an event and the captain to respond at least 90 days before an event. If the organizers are unhappy with the response, they can appeal directly to the police chief. Currently, there is neither a timeline for the application nor an appeals process.

Profitability key

Event organizer and DJ Robbie Kowal said the timeline is crucial because an event’s profitability hinges on being able to sell alcohol and how many off-duty police officers it must hire. The officers are paid time and a half.

“This is really the fulcrum of sustainability,” Kowal said. “Without clarity in the permitting process, it ended up becoming this crazy math equation you were playing in your head.”

Outdoor events like the San Francisco Pride Parade, Chinese New Year Parade and Outside Lands Festival are cash cows for the city, generating millions of dollars annually.

In 2014, 3.3 million people attending outdoor festivals in San Francisco spent an estimated $290 million at the events, according to a report by the city’s Office of Economic Analysis. They spent an average of $89 per person on such items as tickets, food and drinks. The economic benefits extended far beyond the events. Festival-goers spent an additional $990 million — an average of $330 per person — on transportation, restaurants, nightlife and hotels.

But in recent years, some organizers have canceled their events, saying the permit process was too difficult and unpredictable. LovEvolution, the hugely popular and oft-nude bash that attracted upward of 100,000 partyers, was canceled in 2010. The annual North Beach Jazz Festival ended in 2011 after a decade in existence.

While the permit process involves multiple city agencies and covers a range of issues, security is the biggest cost, said Terrance Alan, a founding member of the Entertainment Commission who consults for various events. And with individual police captains making the final decision, the costs can vary widely from neighborhood to neighborhood and even year to year for the same festival.

Difficulty budgeting

For example, in 2009, organizers of the Treasure Island Ghost Ship Halloween event spent about $986 for off-duty police officers, Alan said. In 2013, the cost for the 3,000-person event had risen to more than $2,000. Making matters more confusing, Alan said, “the costs were not known until the week of the event, making budget adjusting impossible.”

San Francisco Police Lt. David Falzon, the Police Department’s liaison with the Department of Alcoholic Beverage Control, said event organizers themselves are sometimes to blame because they don’t work in good faith. But he praised the legislation, saying it “establishes reasonable expectations” for all parties.

Kowal, the event organizer, called it a win-win bill.

“It’s really common sense, and it’s really clear.”

Emily Green is a San Francisco Chronicle staff writer. E-mail: egreen@sfchronicle.com Twitter: @emilytgreen