SAN DIEGO — Tim Lincecum threw his first career no-hitter and the second in the majors in 11 days, a gem saved by a spectacular diving catch by right fielder Hunter Pence in the San Francisco Giants’ 9-0 win against the last-place San Diego Padres on Saturday night.

Lincecum, a two-time Cy Young Award winner, was the loser when Cincinnati’s Homer Bailey no-hit the Giants on July 2.

Lincecum (5-9) struck out 13 and threw a career-high 148 pitches. He walked four and hit a batter.

Still, he needed some help. Pence caught Alexi Amarista’s sinking liner with a full dive to end the eighth. Lincecum pumped his fist as Pence jumped up with the ball in his glove. Amarista put his hands to his helmet and pulled it off in disgust.

“I thought for sure it was a hit,” Lincecum said. “You see Hunter flying out of nowhere making the flying grab. That was really impressive a big play for us.”

Pablo Sandoval did his part, too, when he made a nice backhanded play on pinch-hitter Jesus Guzman’s grounder deep behind third base and threw him out for the third out of the seventh.

Lincecum had been struggling coming in, losing his previous four decisions and hadn’t won since June 4 against Toronto. He hadn’t won on the road since April 3 at the Los Angeles Dodgers.

Then again, he’d gotten only 12 runs of support in his last 10 starts.

The Padres remain the only team without a no-hitter.