3of6San Francisco police officers were highly visible at the Outside Lands festival on Sunday.Photo: Paul Kuroda / Special to The Chronicle

4of6SWAT team members keep an eye on the crowd at Outside Lands.Photo: Paul Kuroda / Special to The Chronicle

5of6San Francisco police officers walk through the crowds at Outside Lands on Sunday.Photo: Paul Kuroda / Special to The Chronicle

6of6Alvin Lin dances while draped in a souvenir Outside Lands blanket during a performance by Ella Mai at the Twin Peaks stage on Saturday.Photo: Paul Kuroda / Special to The Chronicle

As Jim Shively sat next to his wife near the Outside Lands main stage Sunday, listening to blues singer Mavis Staples perform on the festival’s final day, he matter-of-factly pointed to the closest emergency exits to their blanket.

“You have to think about it,” the Lafayette resident said of the worst-case-scenario escape routes. “If not, you’re dead.”

As headlining rap artist Childish Gambino roared the night before in his hit song on gun violence, “This is America.”

There were plenty of frayed nerves among the tens of thousands of music lovers who crammed into the western tip of Golden Gate Park for the three-day event. With three mass shootings fresh in everyone’s minds, including the attack that killed three people July 28 at the Gilroy Garlic Festival, ticket holders waited in long lines to pass through security. Once in the festival grounds, many scoped out the crowd for possible threats and noted the fastest way out should anything happen.

This is the new world of major festivals and gatherings, or what security experts call soft targets.

Karin Harwell found herself surveying the audience for anyone acting suspicious while she sat with her back against a canvas fence near the Sutro Stage, waiting to hear Hozier. The Pleasant Hill resident said security lines felt more stringent this year, and she noticed more police in tactical gear.

“I don’t mind the lines to get in because I want them to check people’s bags,” she said. “It’s like when I (fly). I’ll wait in security because I want to make it a safe situation.”

Heidi Hansen and her husband, Richard Watkins, of San Francisco have been coming with their children to the festival for at least a decade. Their kids are grown now, and the family reunited to watch the Lumineers close out opening day on a grassy wedge of Hellman Hollow.

Halfway through the set, Hansen had a disturbing thought: “ ‘Oh, my God, if something goes down, we’re all here.’”

A security guard checked the lining of Oakland resident David Levin’s baseball cap for weapons when he arrived Saturday. As he reclined in his inflatable chair at the edge of Lindley Meadow, he recalled the size of the guns SWAT members gripped along the festival perimeter.

“I guess it’s the world we live in,” he said.

Outside Lands warned that some acts would “feature loud sound effects that may be startling to some patrons.” A few sets, including those of Lil Wayne, Childish Gambino and Denzel Curry, used gunshot sound effects.

San Francisco police officials said they wouldn’t have arrest totals or statistics on police activity until Monday. But as the event wound down Sunday, a spokesman said there had been no major incidents or violence.

Officers saw “similar calls as in prior years such as traffic control around the perimeter of the venue, controlling guest access at the entry gates and a few medical calls,” said police spokesman Sgt. Michael Andraychak.

Sunday afternoon, in the festival’s waning hours, Staples lamented the ills of the world and America from the main stage.