Updated

A mist swirled above the field and fans stayed put after the final out as the NL West division flags in center field were changed. The Giants went back on top at last.

"Yeah, it's pretty cool. That goes without saying," first baseman Aubrey Huff said.

Huff hit a three-run homer, Buster Posey had a solo shot and San Francisco moved into first place in the division race with a 10-2 win over the Los Angeles Dodgers on Thursday night.

"It says a lot about this club and how hard they've been fighting," manager Bruce Bochy said. "It's going to be a tough race, we know it."

Jonathan Sanchez (11-8) struck out a career-high 12 as the Giants took a half-game lead on the Padres after San Diego lost 4-0 at St. Louis. San Francisco is in sole possession of first place for the first time since May 6. The Giants are trying to end a six-year playoff drought.

"Hopefully we can stay there all the way until the end," Sanchez said. "It feels good to be in first place. We've got a lot of games to go and we've got to keep playing like this if we're going to finish first."

Dodgers starter Ted Lilly (8-11) was done after 3 1-3 innings for his shortest outing of the season. This was just his third loss in nine starts since joining the Dodgers at the trade deadline.

Russ Mitchell homered just fair inside the left-field foul pole for his first career hit leading off the fifth for Los Angeles. He had been 0 for 15.

"The silent treatment is over," Mitchell said of his funk. "I was talking to it, hoping it would stay fair."

Huff and Posey connected for back-to-back homers in the third, the seventh time the Giants have hit consecutive homers this season.

Jose Guillen added a two-run drive in the fifth to make it 8-2. It was his 18th home run of the season and second with the Giants. Guillen returned to the starting lineup after missing Wednesday's game with a painful neck. He underwent an MRI exam Thursday and said everything was fine.

Freddy Sanchez added a two-run double in the eighth.

All the offense helped Jonathan Sanchez win his third straight decision. The left-hander, who has been one of the Giants' most reliable starters down the stretch, recorded his seventh career game with double-digit strikeouts and fourth of the season. He allowed four hits and one run in seven innings and didn't walk a batter for the second time in his 30 starts.

"They're on a roll and swinging the bats," Dodgers manager Joe Torre said. "Sanchez was terrific."

Sanchez's strikeouts were the second-most by a Giant this year. Tim Lincecum struck out 13 at Florida on May 4.

Sanchez has one motivation to keep throwing strikes: "I just want to win it and make the playoffs," he said.

The Giants allowed an unearned run in the first, but Sanchez was unfazed and quickly found his groove.

"It seems like about a month now he's been throwing strikes and getting ahead," Huff said. "When he's doing that, he's one of the most dangerous guys on our staff."

Lilly was tagged for five runs and seven hits, and he struck out three and walked one. He had been so reliable for Los Angeles every fifth day that Torre said before the game, "Lilly's been such a savior for us in more ways than one."

Bochy is using a leadoff man by committee in the absence of the injured Andres Torres, recovering from an emergency appendectomy Sunday. Edgar Renteria took on the job with a lefty starter going and had a triple among his four hits. Milwaukee starts left-hander Randy Wolf on Friday night, so Renteria will be in there again Friday night.

The Giants captured the season series with the Dodgers 10-8, San Francisco's first series victory against its rivals since going 10-9 in 2005. The teams open the 2011 season facing off for four games at Dodger Stadium from April 1-4, 2011.

Los Angeles finished up a 10-game road trip and returned home for a weekend series with the Rockies. Los Angeles faces divisional opponents the rest of the way.

Matt Kemp struck out in the sixth to match his career high of 153 also done in 2008.

Notes: Torre attended Raiders practice across the bay in Alameda and spent some time with owner Al Davis in his office. "I'll tell you, he's sharp," Torre said. "I've known Al a long time. ... It was fun there. You don't realize how big those guys are 'til you're right up next to them." Former Raiders coach John Madden also took Torre around. ... Los Angeles INF Jamey Carroll isn't available for a few days because of a sore wrist that he hurt on a swing several days ago. ... Bochy said rookie C Posey could play every day the rest of the way, perhaps getting a break from behind the plate with some starts at first. ... Struggling San Francisco slugger Pablo Sandoval, in an 0-for-15 funk and 3 for his last 37, sat against an LHP starter and likely won't start Friday either. ... A thick fog hovered over the outfield for the entire game. ... Sanchez became the fourth Giants lefty to strike out 12 or more without a walk since 1920.