SAN DIEGO (AP) -- The San Francisco Giants know time is running short on defending their World Series title.
Aaron Harang threw seven strong innings and Cameron Maybin had two hits and an RBI as the San Diego Padres dealt a big blow to the Giants' fading playoff hopes with a 3-1 victory Wednesday night.
The Giants, who have 19 games left, trail NL West-leading Arizona by seven games after the Diamondbacks beat the Rockies 5-3 on Wednesday night. San Francisco has dropped three of four and six of 10.
"We have to win," Giants starting pitcher Matt Cain said. "That's all we have to do, is win."
San Francisco was going for a sweep of the three-game series against a club it had beaten six of the previous seven games at Petco Park.
But Cain, who is 8-19 lifetime against the Padres, had little to show for allowing two runs and four hits in seven innings. After he allowed Will Venable 's leadoff homer in the first, he settled down and retired 11 consecutive batters before he issued two walks. Cain didn't allow another hit until Maybin's two-out double in the sixth.
"He did a great job," Giants manager Bruce Bochy said. "He gave up the leadoff homer and then he dealt. He keeps grinding out there for us."
Cain (11-10) struck out seven and walked three as he made his 200th career start.
San Francisco rookie Brett Pill homered for a second straight game after he hit a home run Tuesday night in his first major league at-bat.
"It's kind of frustrating when we can't really do anything for Matt," Pill said.
Venable scored twice, while Maybin doubled and tripled in a run in the ninth.
The Padres got clutch defensive plays by Venable and Maybin.
The first was by Maybin, who made a long running catch while crashing into the wall in left-center field to rob Justin Christian leading off the game. Maybin hit his forehead on the padded wall and was on the ground for about a minute before he got up and stayed in the game.
"I kind of face-planted dead square," Maybin said. "Luckily, I was able to make a play and keep the early momentum because those guys take advantage."
Venable threw out Pill at home in the seventh when the rookie tried to score on a medium fly ball to right by pinch-hitter Pat Burrell .
"It's one of those things that you have to go for it," Bochy said. "It took a perfect throw. Those are the things you look back on and they hurt."
Said Harang: "The guys made some good plays from the first hitter of the game that kind of set the tone. It showed the intensity and excitement level that was going to happen."
San Diego, last in the NL West at 62-81, won for the second time in 13 games overall.
"That's the kind of intensity we have to bring day in and day out, no matter where we are in the standings," Maybin said.
Harang (13-5) broke a two-start losing streak by allowing one run and four hits in seven innings. Harang, who struck out three and walked three, is 2-0 with a 0.90 ERA in three starts this season against the Giants, all at Petco Park.
Heath Bell got the final four outs for his 36th save in 40 chances. Bell replaced Chad Qualls in the eighth and threw one pitch to retire Carlos Beltran on a line drive to right with a runner on first and two outs.
Venable led off the Padres' first with his seventh homer to right. It also extended his season club record for leadoff homers to five.
The home run was the third allowed by Cain in his last 20 starts. Overall, Cain has given up only eight homers.
"Everything was feeling all right," he said. "I was trying to get ahead of guys and get early strikes."
Pill tied the game with a homer leading off the fifth. Pill joined John Bowker as the only two players in franchise history to homer in their first two major league games.
Pill homered off Wade LeBlanc on Tuesday night in his first major league at-bat, a two-run shot in the second inning of the Giants' 6-4 win.
The Padres took a 2-1 lead in the sixth when Jesus Guzman singled in Maybin, who reached on a two-out double.
Notes: Cain has pitched 203 innings this season, the fifth straight season he has reached the 200-inning mark. ... Bowker homered in his major league debut on April 12, 2008, and again the next day. ... Padres manager Bud Black said after the game that INF Logan Forsythe would undergo surgery on his left knee on Thursday. Forsythe has not played since Friday with an inflamed patellar tendon in his right knee. But Black said Forsythe's left knee, surgically repaired in the offseason, starting bothering him midway through this season. ... After a day off, Giants RHP Tim Lincecum (12-12, 2.75 ERA) will attempt to beat the Los Angeles Dodgers for the first time this season in four starts (0-2, 1.86) on Friday to open a six-game homestand. LHP Clayton Kershaw (17-5, 2.45) pitches for the Dodgers. ... LHP Cory Luebke (5-8, 3.29) will start for the Padres on Thursday at Arizona, facing NL wins leader RHP Ian Kennedy (18-4, 2.96).