SAN DIEGO -- Tim Lincecum did everything he could Sunday to bring the Giants a victory.

His performance concluded and mirrored the Giants' efforts during their crucial 10-day trip, when they did virtually everything they could to earn a postseason berth.

Lincecum pitched seven slick innings and stroked a two-run single to lead San Francisco past the San Diego Padres, 6-1. The Giants' ninth victory in 12 games pulled them virtually even with the Padres atop the National League West standings for the second time in three days.

"Obviously, with the position we're in, we needed to win today," Lincecum said.

San Francisco (81-63, .5625) forged the all-but-official tie with San Diego (80-62, .563) by capturing three of four games in this showdown series -- an impressive achievement, given the Padres' 9-2 record against the Giants before the series began.

"This is why you play the game," said catcher Buster Posey, whose two-run, first-inning homer off Padres ace Mat Latos gave the Giants a stimulating and immediate edge. "It's pretty cool to be almost halfway through September and in a tie for first. There's a lot of fun games coming up."

That seemed like a safe assumption, given San Francisco's consistency on this three-city journey. The Giants were winners on each stop, taking two of three at Los Angeles and Arizona before subduing the Padres to finish the trip with a 7-3 record.

It was fitting that Lincecum, the Giants' biggest winner of all since he ascended to the Major Leagues in 2007, concluded this sojourn with another powerful performance.

Lincecum (14-9) struck out nine in seven innings while allowing San Diego's lone run and seven hits. As if for emphasis, he ended four innings with strikeouts.

After posting a dreadful 0-5 record with a 7.82 ERA in August, Lincecum is 3-0 with a 2.08 ERA in three starts this month. Opponents are batting .207 against the two-time NL Cy Young Award winner in September, compared with .311 last month.

Lincecum said that his confidence has never been higher this year.

"I just have to try to keep that going," he said.

Though Lincecum regarded each of his pitches as effective, he particularly credited his slider, which he refined in recent days while playing catch with fellow right-hander Matt Cain.

"I was making sure that it doesn't look too much like a slurve, which it had been lately for me," said Lincecum, who became only the fourth Giant in franchise history to amass 200 or more strikeouts in three consecutive seasons. "I tried to take that extra loop out of it and make it look more like a fastball. I benefited from that today."

A prime example of this occurred in the fifth inning. After David Eckstein's two-out single narrowed the Giants' lead to 5-1, Lincecum threw an 0-1 slider that Miguel Tejada missed. Lincecum came right back with the same pitch, which Tejada flailed helplessly at again.

Lincecum bested Latos (14-6), who surrendered five runs and seven hits in four innings. The Giants ended Latos' Major League-record streak of 15 consecutive starts of at least five innings in which he allowed two or fewer runs.

"Today I just lost track of my game plan," Latos said. "I didn't establish strike one ... and kind of nitpicked a little bit. I didn't have my slider with me today and didn't have my curveball with me. That's always helpful -- to be able to have two, three or four pitches for them to look at instead of just looking at one pitch."

Latos looked indomitable as he struck out Aaron Rowand and Freddy Sanchez to open the game. Then Aubrey Huff singled to right field. Up came Posey, who again demonstrated his opposite-field prowess by lashing Latos' first pitch into the right-field seats for his 13th homer of the season.

"With a guy like Latos who pounds the zone and has such good stuff, you're looking for a pitch to hit, because you don't want to get too late in the count with him," Posey said, explaining his aggressive approach.

Manager Bruce Bochy understood the significance of Posey's drive, since the Giants had scored one run in 21 innings dating to Thursday's series opener -- including Saturday's 1-0 loss -- before the rookie connected.

"I think Buster's home run got us going," Bochy said. "You get shut out the day before, and to get two runs early, I think that relaxed everybody."

Lincecum applied the finishing touches to Latos' afternoon in the fourth inning, grounding Latos' first pitch inside third base after Pablo Sandoval walked and Juan Uribe doubled.

"It's almost like I hit it out of the [catcher's] glove," Lincecum said. "That's what it felt like. I was so late. But it's still a hit. So it worked out."