Five years ago, Chicago altered the route of its annual Pride Parade to curb public drinking and accommodate crowds approaching 1 million.

Last year, the city’s second-largest parade made another round of security changes — including the hiring of 90 off-duty police officers — to avoid a change of venue from Boystown to downtown.

Now, those rowdyism concerns seem like the good ol’ days.

The rules have changed dramatically in the wake of the Orlando nightclub massacre and the arrest of an Indiana man with assault rifles and explosives in his car who told police he was on his way to the Los Angeles Pride Parade.

Still, Mayor Rahm Emanuel said the most deadly mass shooting in U.S. history makes him more determined than ever to forge ahead with Chicago’s annual Pride Parade amid tightened security on June 26.

“This was not an attack on one location and it was not an attack on one city. It was an attack on our common values that we all share,” the mayor told reporters before attending Monday’s Clemente High School graduation ceremony at Moody Bible Church, 1630 N. Clark.

“I asked . . . that all of us take stock of our freedoms and not cower in the face of terrorism or terrorists who are trying to intimidate us,” he said. “Which is why I want to make sure that we, as a city, are not only going forward with our . . . Gay Pride Parade, but because that is where we express our common values of inclusion.”

The mayor questioned how slain terrorist gunman Omar Mateen, who opened fire in Orlando’s Pulse nightclub, managed to pass two rounds of background checks, get licensed as a private security guard and secure a concealed-carry permit needed to purchase an assault weapon after he had twice been interviewed by the FBI.

“The idea that a terrorist could go into a gun store and be able to purchase a gun that’s meant for the battlefield and not for the streets” is mind-boggling, Emanuel said.

“After San Bernardino, after Orlando, it is clear that we have to tighten up as it relates to terrorists [and] people with mental health issues the ability to go into a gun store and buy a gun,” he said. “Our gun laws are way too lax for the type of life we want and we all share and the values we share.”

Longtime parade coordinator Richard Pfeiffer said security changes were in the works, even before Mateen gunned down 49 patrons at a gay nightclub in Orlando. Mateen was killed in a shootout with police.

Instead of 90 off-duty police officers paid for by parade organizers, there will be 160 moonlighting cops to help with crowd control until 6 p.m.

That will free hundreds of Chicago Police officers, some on horseback, to concentrate on the evening hours, when public drinking and all of the problems that come with it really have gotten out of hand. Particular attention will once again be paid to CTA stations near the parade route.

“That’s why we’re here this year — because of the changes we made. That’s why we wanted to add security to tighten it up even more. It worked to have extra security to provide better crowd control and control excessive drinking. With the extra security, it’ll be a bigger help,” Pfeiffer said.

“The city also asked that we reduce the size of the parade. Last year, we had 215 entries. We cut back this year to 160 entries to make it a little bit shorter, a little bit tighter,” he said. “If people came with open containers of alcohol, they were asked to throw it out into baskets along the parade route. That will be done again. Everything that went on last year . . . will go on this year with a little extra security because of what happened in Orlando.”

Pfeiffer said it will be up to the Chicago Police Department and the city’s Office of Emergency Management and Communications to determine whether there’s a need for bag searches along the 21-block parade route.

Local Ald. James Cappleman (46th) said he’s all for the idea.

“The L.A. Pride Parade discovery of all those explosives makes me concerned. I’m open to anything law enforcement experts suggest based on the feedback they get from the FBI. If they believe [bag searches] needs to happen, I would certainly support it and I think the general public would support it,” Cappleman said.

“People made a fuss about the long lines at airports and all of the searches required after they took a flight out after 9/11,” but they got used to that, too, the alderman said.

Town Hall District Cmdr. Robert Cesario could not be reached for comment.

Melissa Stratton, a spokeswoman for the city’s Office of Emergency Management and Communications, said the Chicago Police Department has “already deployed additional officers” to the Town Hall District and the city’s public safety departments will meet later this week to discuss “any additional resources” for the Pride Parade and the weeklong festival leading up to it.

“We already have a pretty robust plan in place due to the size and potential for extremely hot temperatures,” Stratton wrote in an email to the Chicago Sun-Times.

“Over the last few years, we have changed the route in an effort to decrease congestion by spreading the crowd out,” she said. “Some of the safety measures implemented last year included increasing our barricade plan [and] incorporating more pathways for emergency resources to expedite [Fire Department] access to medical tents. We also closed off streets to help better manage the crowd.”

Last year, Cappleman and Ald. Tom Tunney (44th) asked “a couple dozen” bars with 4 a.m. licenses to voluntarily agree to close at 2 a.m. on parade day.

Their plan also included: multiple checkpoints along what Tunney described as a “porous” parade route to limit public drinking; barricading Belmont Avenue; limiting political parade entries; and doubling the contingent assigned to clean up the littered streets and sidewalks after the parade.

Tunney could not be reached for comment. Cappleman said those safeguards will be repeated this year, but public drunkenness will no longer be the primary concern.

“It seems minor now. I will admit it,” Cappleman said.

Gallery