The Giants needed every inning and every run to finally defeat the Padres. Even after a two-run double by Matt Downs as part a three-run 12th inning, the Padres (23-16) came back in the bottom of the inning with two runs on a David Eckstein double.
Finally, Giants closer Brian Wilson struck out Chase Headley with two runners on to secure the victory for San Francisco (22-16).
Latos, who tossed a one-hit shutout against Sanchez five days ago on the road, allowed two runs in six innings. The Giants got four hits against him in the fourth inning alone, though one was an infield single and another a soft liner to right field.
"Everything was going good, but the fastball was up a bit," Latos said. "They hit a couple of mistakes over the plate ... a couple of solid hits and a couple of bleeders."
Said Padres manager Bud Black: "None of them were overly blistered."
Latos' counterpart, Sanchez, carried a perfect game into the fifth inning. On appearances alone, this start looked eerily like the one the left-hander made last summer that ended in a no-hitter against the Padres.
But for as good as Sanchez was against this familiar lineup -- he struck out five in the first four innings alone -- his start essentially fell to pieces in the fifth inning when he allowed four consecutive singles to start the frame.
Hits by Headley, Nick Hundley and Oscar Salazar -- a late substitute for Kyle Blanks, who injured his right elbow in batting practice -- gave Chris Denorfia, in his first start since being recalled from Triple-A Portland, a chance to hit.
Denorfia came back from an 0-2 count to punch a ball into right field that cut the Giants lead to 2-1. After Everth Cabrera reached on a fielder's choice with an out recorded at home, the tying run scored when Sanchez unloaded a wild pitch with Latos at the plate.
"That was a big one against Sanchez," Black said of Denorfia's hit. "Down 0-2 with the pitcher coming up ... that was a clutch hit by Jerry as well."
Leadoff hitter Jerry Hairston Jr., who entered the game hitting .217, then lined a two-run single into left field for a 4-2 lead, a lead that appeared safe with the way Latos had been throwing and the success of the back end of the Padres bullpen.
Luke Gregerson, following a tried-and-true formula, worked a scoreless seventh inning before turning the ball over to Mike Adams in the eighth inning. Aaron Rowand lined a double to left field. The next batter, Andres Torres, then destroyed an Adams' fastball, sending it well over the fence down the right-field line to tie the score.
"Over 162 games, guys aren't going to be invincible," Black said of his normally reliable bullpen. "Those guys have been a big part of where we are."
The Padres are still in first place in the National League West, a half-game ahead of the Giants after a 1-4 homestand against two teams that trail them -- the Dodgers and the Giants. Now, the team heads to Dodger Stadium for two games starting Wednesday.
They will do so with some concern. Reliever Joe Thatcher was removed from the game in the 12th inning with a sore left side. He didn't think it was an oblique strain, which can be a debilitating injury for a pitcher.
"I felt like I could [continue to] pitch if needed to," Thatcher said. "It wasn't grabbing or anything. I don't think it's anything serious."
Also, Blanks' status is unknown. The Padres already have one outfielder -- Scott Hairston -- on the disabled list.
Black had yet to speak to the Padres medical staff by the time he met with reporters after the game, though he indicated both players were "sore."