Chase Headley's two-run home run in the 10th inning gave the San Diego Padres a 7-5 win over the Pittsburgh Pirates in the second of three from Petco Park.

With Daniel McCutchen (0-1) on the mound, Will Venable worked a leadoff walk then stole second. Headley then ran the count full before crushing a pitch deep over the right-field wall for the win.

Venable went 4-for-5 with an RBI and three runs scored, while Cameron Maybin was 4-for-4 with a run scored for the Padres, who have won three straight after dropping their previous five.

"We don't want to go out there and give any games away," Maybin said. "It's fun making it tough on people who are trying to accomplish something that's tough to do and that's make it to the playoffs."

Jason Marquis started the game for San Diego and gave up three runs -- two earned -- on seven hits with three walks and five strikeouts over 5 1/3 innings. Miles Mikolas (2-1) worked the top of the 10th for the win.

Garrett Jones hit two home runs, including a game-tying two-run shot in the ninth for the Pirates, who have dropped the first two of this series after a 19-inning win over St. Louis on Sunday. A.J. Burnett started for Pittsburgh and gave up 12 hits and four runs with five walks over 6 1/3 innings.

The Padres got on the board in the first inning. Everth Cabrera led off with a single, stole second and moved to third on a single from Venable. Cabrera was then caught in a run-down between third and home on a grounder to first from Headley, but the runners wound up on second and third before Cabrera was tagged out. Carlos Quentin then doubled into right to plate Venable and Headley for a 2-0 lead.

"The one thing that's continued to get us is the first-inning runs we're giving up," Pirates manager Clint Hurdle said. "That has continued to be a little problematic and 0-2 base hits. It happened to us a couple more times tonight."

Pittsburgh left a man on second in the second, but got one across in the third. With one out, Jose Tabata and Travis Snider singled. Andrew McCutchen then hit a grounder to third and San Diego got the force at second, but Alexi Amarista's throw to first went high and Tabata came home to score.

San Diego loaded the bases with one out in the third, but Yonder Alonso hit into a double play. A nice defensive effort in the fourth, though, kept it a one-run game.

With one out, Jones singled before Pedro Alvarez struck out. Clint Barmes followed with a double to the corner in left. Quentin got the ball and fired it to the relay man Amarista, who then snapped a strike home and Yasmani Grandal applied the tag on Jones to end the inning.

The Padres left the bases loaded in the fifth and Pittsburgh jumped on top in the sixth.

With one out, Jones hit his 20th homer of the year, a solo shot to right that tied the game. Alvarez then walked and Barmes singled. Nick Vincent took the mound next and Rod Barajas doubled home Alvarez to make it a 3-2 game.

San Diego, though, tied it in the bottom of the inning. With the bases loaded and no outs, Venable hit a chopper to first that Jones was unable to field cleanly, allowing Maybin to score. However, Headley looked at strike three and Quentin hit into a 5-4-3 double play to end the frame.

The Padres got sacrifice flies from pinch-hitter Chris Denorfia in the seventh and Quentin in the eighth for a 5-3 lead, but it wasn't enough.

Dale Thayer came on to close the game in the ninth and got the first out, but McCutchen followed with a single. A fielder's choice from Neil Walker saw McCutchen forced out at second, but Jones' second homer of the game, a shot to straight center, tied the contest.

Game Notes

The Padres stranded 14 men on base and batted 4-for-19 with runners in scoring position ... Pittsburgh left 11 on base and was just 1-for-10 with RISP ... San Diego has taken four of five from Pittsburgh this season ... Before the game, the Pirates recalled Daniel McCutchen from Triple-A Indianapolis, reinstated pitcher Chad Qualls from the bereavement list and optioned pitchers Kyle McPherson and Justin Wilson to Indianapolis.