SAN DIEGO -- On Thursday, the Giants turned the traditionally pitcher-friendly PETCO Park into a hitter's paradise by clubbing four home runs.

On Friday, they turned around and beat the Padres at their own game.

And in the end, the Padres have officially watched their once-comfy lead in the National League West evaporate before their very eyes.

The Giants held the Padres to just three hits and used a heavy dose of small ball in a decisive seventh inning to propel them to a 1-0 victory Friday at PETCO Park.

"It's frustrating that it's so close, and we feel it," Padres starting pitcher Clayton Richard said. "We understand that being that close that we need to push over and get those types of wins."

The win pulled the Giants (80-62) into a tie with the Padres (79-61) atop the NL West with two games remaining in a four-game weekend series. Both teams sit 2 1/2 games ahead of the surging Rockies, who topped Arizona, 13-4, on Friday at Coors Field to capture their eighth consecutive win.

It's the first time San Diego has fallen out of sole possession of first place in the NL West since it dropped a half-game out of the top spot following a loss to the Blue Jays on June 16. The Padres regained a one-game lead two days later with a win over the Orioles.

"Tomorrow is going to be another day," Padres shortstop Miguel Tejada said. "Now we're tied. It's going to be a 22-game season, and we're going to try to win the most we can of those 22 games."

San Francisco broke a scoreless tie in the seventh in a manner that shouldn't look too out of the ordinary to anyone who's followed the Padres this season, as the Giants didn't need a hit to scratch the game's only run across.

After Aubrey Huff reached first on a hit-by-pitch and stole second base when Pat Burrell struck out, he advanced another bag on a fielder's choice when Tejada elected to throw to third base and Huff beat the tag by Chase Headley.

"I just made a quick decision," Tejada said. "In that situation, when somebody's on second, you never go to third on that ball. But he went and I saw him. ... In that situation, I don't want him let him go [to third] and throw to first. It's a long throw to first, so that's why I made the decision to go to third.

"At that time, I think that's the best play. I think it is bad baserunning for him. I think he just gets lucky he gets in there. It's good hustle, too."

Huff then scored on a forceout when Juan Uribe legged out a potential inning-ending double play.

"We just couldn't punch a run across, and they punched a run across on a bang-bang double-play ball," Padres manager Bud Black said.

Other than that one unorthodox inning, the rest of the game belonged to those on the mound, though even the pitchers' duel wasn't all that typical.

Jonathan Sanchez gave up just one hit but scattered seven walks through five shutout innings, while his lefty counterpart, Richard, allowed two hits in six-plus frames but was tagged with a loss.

"Two good left-handed pitchers with good stuff," Black said. "A lot of fastballs. I think both guys made some pitches when they needed to."

But the pitch that came back to bite Richard (12-7) was the one that plunked Huff and opened the door for his interesting trip around the basepaths.

"We were trying to get in there," Richard said. "I didn't want to miss over the plate, especially with one ball on him already, and unfortunately it got in too far."

The Padres' best scoring chance against Sanchez came when Chris Denorfia and Ryan Ludwick walked ahead of Adrian Gonzalez in the fifth, but the first baseman grounded into an inning-ending double play.

San Diego later required the Giants to go to closer Brian Wilson for a five-out save when Gonzalez sent a one-out single to right in the eighth, but after Tejada reached on a fielder's choice, pinch-runner Everth Cabrera was caught trying to steal second base two pitches later to end the inning.

"That kind of sealed it for us," Wilson said.

The next inning, Wilson walked pinch-hitter Matt Stairs with two outs but struck out Will Venable to clinch the game and his 42nd save.

The most immediate cause for concern for San Diego continues to be its dormant offense, which has scored three runs or less in 11 of its last 14 contests.

"We're going to get that big hit; we're going to get it," Black said. "And when we do, I think you'll see our offense come back.

"We're still in [an offensive slump]. We're going to come out of it with a vengeance at some point. I think we've got too good of hitters on this team to stay in this too much longer."

But in the bigger picture, the Padres now find themselves in a position they haven't been in in nearly three months. They don't have the firm grip on the division lead that they once did, but they still have two more chances against the Giants this weekend to come out of the four-game series back alone in first place.

"Right now, we cannot put in our heads that they tied us," Tejada said. "We're happy to be in this situation. I think everybody in baseball wants to be in the situation that we are right now. We've just got to believe in ourselves, believe in what we've done the whole year and continue to play hard baseball and win some games."