SAN FRANCISCO (AP) -- Tim Lincecum is pitching like his old carefree, confident self, and the San Francisco Giants are once again generating timely hits.
The World Series champions are suddenly right back to their winning ways after a rough April.
Buster Posey hit a two-run homer in the seventh inning through a thick mist hovering above the field, new-look Lincecum won his third straight decision, and the Giants beat the Los Angeles Dodgers 4-0 on Wednesday night for their fifth straight victory.
"I'm trying to be deceptive with the stuff I have," Lincecum said of adjusting his approach. "It was another night of great defense behind me."
Brandon Crawford had an RBI single among his three hits and Angel Pagan backed Lincecum with his glove by stealing an extra-base hit from Yasmani Grandal with a great catch at the wall in center field in the seventh. San Francisco matched its season-high winning streak and pulled within 2 1/2 games of NL West-leading Los Angeles.
As it has for so long, the success has started with pitching.
"We've gotten back where we are right now with quality starts," manager Bruce Bochy said. "Timmy, he's on a nice roll now."
Lincecum (4-2) won a fourth straight home start for the first time since July 4-Aug. 1, 2009. He struck out four over seven innings to pass Hall of Famer Carl Hubbell for fourth place on the franchise list with 1,680 Ks.
"Obviously in the moment, it's a pretty cool acknowledgement of what I've been able to do in my career," he said.
Brett Anderson (2-2) struck out seven in 6 1-3 innings but received no support to lose for the first time in five starts. The Dodgers dropped to 0-5 at AT&T Park this season, marking San Francisco's longest home winning streak in the rivalry in 12 years -- since winning five straight from April 10-June 24, 2003.
The Dodgers have scored only two runs in 39 innings and were shut out for the second straight night, their first time being blanked in consecutive games since three in a row by the Giants from June 25-27, 2012. Los Angeles had its streak of seven straight unbeaten series snapped.
"It's very difficult, especially when we're not getting guys on base," Grandal said. "It's going to happen. It might as well happen right now. It's early in the season still."
Posey -- playing first base to give him a break from catching duties -- greeted reliever Justin Turner by sending an 0-1 pitch into the seats in left-center for his seventh home run. He made a great catch over the railing in front of the Dodgers' dugout in the eighth, and the ball barely stayed in his glove.
Posey also singled and doubled while extending his hitting streak to 12 games. Joe Panik hit an RBI single ahead of Posey in the seventh for the Giants, who are the closest they have been to first place in the division since April 13.
Pagan batted leadoff and Justin Maxwell played left field as Nori Aoki had a break.
Pagan's leadoff infield single in the first was challenged by the Dodgers and overturned in 2 minutes, 12 seconds.