“It was the biggest hit of my career,” said Herrara, having kept the Dodgers’ hopes alive another day.

The Giants’ Bochy, meanwhile, could afford to be magnanimous.

“It was a good ballgame,” he said. “Good pitching on both sides. We just came up a little short.”

His laconic nature belies what has been one unusual season in San Francisco. The Giants lost their star closer, Brian Wilson, for the season to an elbow injury in April, and the next month another reliever, Guillermo Mota, was suspended for 100 games for testing positive for performance-enhancing drugs for the second time.

But even then the Giants’ troubles were not over. In August, outfielder Melky Cabrera, the most valuable player of the 2012 All-Star Game and the leading hitter in the National League, was suspended for 50 games for a positive drug test of his own.

On the morning of Aug. 15, when the Giants learned of Cabrera’s suspension, they were tied with the Dodgers atop the National League West. Ten days later, when the Dodgers engineered a trade that brought them Adrian Gonzalez, Josh Beckett and the injured Carl Crawford from the Boston Red Sox, the Giants had edged ahead by two games. But the consensus in baseball was that the Dodgers, with their new, financially aggressive ownership, would find the momentum to pull past the Giants, who, after all, would not have Cabrera for the rest of the regular season. And that it would be the Giants who would go down to the wire clawing for a wild-card spot.

That did not happen. Almost defying logic, the Giants have flourished without Cabrera and even after Monday night’s loss were eight games ahead of the Dodgers in the standings.

“It was a definite blow,” San Francisco reliever Javier Lopez said of Cabrera’s suspension. “He was having a big year for us in the middle of the order. But we had to look in the mirror and ask ourselves: Are we good because of him, or has this been a team effort?”