SANTA CLARA — The 49ers and their partners have improved their Levi’s Stadium performance off the field over the last six weeks, but one menacing foe won’t be easy to overcome: postgame traffic.

About half the fans who drove to Sunday’s regular season home opener against the Chicago Bears were trapped in their lots for up to two hours as a constant stream of pedestrians and trains blocked their paths. The team says it may have to slow down train service after the game or make other changes to handle the onslaught of more than 20,000 vehicles.

“We’re going back to the drawing board. It’s taking far too long for my liking,” said Jim Mercurio, the 49ers vice president of security and operations. But he added: “I got to be honest — that’s one you can’t really solve for, when 70,000 people all leave at the same time, but I’m not going to stop until we make it as optimal as we can.”

After two preseason games and a pair of soccer matches, Sunday’s prime time event was the first time the entire crowd in Santa Clara left a 49ers game at once. Those who rode the rails or parked in outer lots a half-mile or more away from the stadium zipped out, while fans quickly got through security lines before the game, taking an average of 12 seconds to have their tickets scanned and go through metal detectors, and reported comfortably short waits for bathrooms and food stands.

But Niners faithful who parked in two large inner lots along the train tracks saw their frustrations over the team’s crushing defeat compounded by gridlock.

“I went 25 feet in an hour. It was just to the point where it was really, really getting out of control back there,” said season ticket holder Jerry Karp of Santa Clara. “It’s new, but they don’t have it together at all.”

Karp, who’s been going to games for more than a quarter-century, said the problem was so bad he might dump some of his tickets this year. He was among those who reported that some of the exit lanes appeared to be mysteriously closed, and after an hour or so some attendees decided to take matters in their own hands, knocking over the temporary chain-link fences or driving over obstacles such as medians to escape.

Brian Nitenson, 30, of Daly City, paid $20,000 apiece for club seat licenses and was astonished that the traffic getting out was no better than rundown Candlestick Park.

“The traffic leaving the game was so bad that I was considering getting a hotel for the next home games, but I hope it doesn’t come to that,” said Nitenson, who was able to back out of his parking space and then didn’t budge for the next hour.

Like others, Nitenson, an 11-year season ticket holder, said it looked like the well-meaning parking attendants were “clueless” and that it took an hour for police officers to come.

Don’t blame staff

But don’t blame the staff, Mercurio urges. Those fans in the affected blue and green lots, which hold about 10,000 vehicles combined next to the stadium, have exit lanes that cross pedestrian paths and train tracks, with trains leaving every five minutes after the game. That means there were only small windows for vehicles to exit.

Since so many more people drive than take the train, Mercurio’s team will look at slowing down train service, perhaps to every seven or eight minutes, to let more vehicles through, among other potential changes. They have until the next stadium event, a Sept. 28 day game against the Philadelphia Eagles.

On the bright side, traffic before the game was so smooth that more than 68,500 fans were inside the stadium before the kickoff — a feat Mercurio can’t remember happening in more than 20 years at Candlestick. There were also no major incidents for fans during the game and arrests for only minor infractions. And a day after the action, the team reported that the newly installed field had help up nicely.

What’s more, the Valley Transportation Authority logged another win following a really rough outing during the opening stadium event on Aug. 2. Gone are the long postgame waits for light-rail trains and over-packed train cars, as the addition of an extra storage track outside the stadium, beefed-up service and a tweak to how passengers are loaded seem to have paid off.

Still, the agency’s buses and trains carried 9,400 people, down 11 percent from a peak of 10,600 from the first preseason game last month. While planners had anticipated 20 percent of attendees taking transit to stadium events, only a bit more than 15 percent rode the rails or buses Sunday.

“We have extra capacity,” VTA spokeswoman Colleen Valles said.

While most transit riders used rail, more than 1,100 attendees took the bus, and many were stuck in the same traffic as everyone else. Valles said the agency will work with local authorities to try to give buses priority access on the road for future events.

Contact Mike Rosenberg at 408-920-5705. Follow him at Twitter.com/RosenbergMerc.