Updated

Andrew Cashner shined on both the mound and at the plate to lead the San Diego Padres to a 2-1 victory over the San Francisco Giants in the opener of a three-game series from Petco Park.

Cashner (1-1) held the Giants to one run on five hits while striking out five over six strong innings in his second start of the season, and added a single and a stolen base while scoring a key run that helped the Padres to a second straight win following a five-game skid.

Carlos Quentin and Yonder Alonso each came through with RBI singles for San Diego, while Huston Street stranded a pair of Giants in the ninth to close out the contest.

San Francisco, which entered the set off back-to-back extra-inning defeats to Arizona, was dealt a third straight narrow loss despite a solid showing from Tim Lincecum (2-1). The two-time NL Cy Young winner yielded two runs while fanning nine batters over seven frames in a hard-luck outcome.

"I thought he threw the ball well," said Giants manager Bruce Bochy. "He left a couple pitches up, but I'll take that outing any time."

Angel Pagan, Buster Posey and Brandon Belt all collected two hits for the Giants, who went 0-for-5 with runners in scoring position.

Cashner struggled early on, giving up a single to Pagan to begin the game that led to a run after the Giants' leadoff man stole second, moved to third on a ground out and came home on the right-hander's wild pitch. He ran into jams over the next two innings as well but escaped unscathed, then found a groove over the remainder of his stint.

San Francisco didn't have a runner reach base over Cashner's final three innings of work, with the Padres' starter setting down the last 12 batters he faced.

"I thought I was struggling a little bit there at the beginning of the game," said Cashner. "But I finally settled in and started making pitches."

He also helped his own cause by leading off the bottom of the third with a sharp single to center and beat Posey's throw to second after being sent in motion on an eventual strikeout by Will Venable.

The Padres then ripped off three consecutive singles against Lincecum, with Quentin and Alonso capping the sequence with back-to-back base hits that put San Diego in front.

San Francisco also went down in order in the seventh and eighth against relievers Joe Thatcher, Dale Thayer and Luke Gregerson, but threatened when Street came on in the ninth after singles by Posey and Belt put the tying run to third with two out.

Street got Brandon Crawford to bounce into a fielder's choice, however, to end the game.

Game Notes

The Padres won for only the fourth time in their last 18 matchups with San Francisco, which swept a three-game set between the teams at AT&T Park earlier this month ... Cashner's hit was only his second in 12 career major league at- bats ... Posey extended his hitting streak to seven games and is batting .409 (9-for-22) over that stretch.