Updated

Whatever momentum San Diego built during its best homestand of the season has quickly vanished in the span of two nights.

Not even a second straight solid outing from Edinson Volquez could keep the Padres from losing this one.

Reliever Joe Thatcher allowed a walk and two hits in the ninth inning, including Brandon Crawford's game-winner that lifted the San Francisco Giants to a 3-2 victory Tuesday night.

"I just didn't make a good pitch," said Thatcher, who also took the loss against Colorado on Saturday. "Bad execution. Didn't get the job done."

It wasn't just the bullpen that cost the Padres.

San Diego scraped out seven hits but stranded three runners in scoring position, including the potential go-ahead run in the top of the ninth.

Suddenly the Padres 5-2 homestand is looking more like a blip instead of a sign of things to come.

Brandon Belt walked to open the ninth and Angel Pagan singled. Both runners moved up on a wild pitch, leaving first base open. Rather than intentionally walking Crawford to set up a force play, San Diego manager Bud Black opted to have Thatcher (0-4) go for the out.

Crawford delivered his first career walkoff hit.

"I like that matchup," Black said. "You look at Joe against a guy who's hitting down in the order, you hope for the punchout there. But it didn't happen."

Volquez got off to a shaky start for the Padres but was unhittable over his final six innings. He allowed two runs and three hits over seven innings. He walked three and struck out eight and drove in a run.

"I don't know how I hit that ball," Volquez said of his RBI single in the second. "I just think I closed my eyes and swung."

Jesus Guzman had two hits and drove in a run for the Padres, who have lost 17 of their last 22 against the Giants.

Santiago Casilla (4-4) pitched the ninth for the victory.

Giants starter Madison Bumgarner gave up two runs and six hits, walking two and striking out nine.

Bumgarner is 1-2 with a 4.15 ERA in four starts since his first career shutout and complete game.

The Giants scored twice in the first inning before Volquez shut them down. Nate Schierholtz doubled and went to third on Ryan Theriot's single. Melky Cabrera grounded out to score one run and Pablo Sandoval doubled home the other run.

Volquez did not give up another hit the rest of the way.

The Padres tied the game in the third on doubles by Carlos Quentin and Guzman and Volquez's RBI single.

NOTES: Volquez is 3-0 over his last six starts with a 1.56 ERA. ... Alexi Amarista's injured left thumb will likely keep him out of the Padres lineup for the next two games. ... Black decided to stay with the rotation, giving the starters an extra day of rest. Following Thursday's day off, the Padres will start Kip Wells, Ross Ohlendorf and Clayton Richard. "It's the time of year an extra day might be good for the guys," Black said. ... Padres INF-OF Alexi Amarista (jammed thumb) will avoid a trip to the disabled list. "He's doing much better," Black said. ... Padres OF Cameron Maybin took swings off a tee and may be back sooner than anticipated. ... Padres RHP Tim Stauffer will throw a bullpen Wednesday and if all goes well, will go to Arizona for a couple of more bullpens before appearing in games.