James McDonald could use a shot of confidence and Pittsburgh Pirates manager Clint Hurdle tried to give it to him Friday night by allowing the struggling right-hander the opportunity to work out of a jam.

The move backfired, however, and the Pirates went on to lose 9-8 to San Diego as Chase Headley hit home runs from both sides of the plate for the first time in his career and drove in five runs for the Padres.

San Diego had scored three runs in the fifth inning to trim its deficit to 7-4 and had runners on first and second with one out when Hurdle decided to keep McDonald in the game to face Headley.

Headley blasted a three-run home run to center field to tie the score and chase McDonald. Headley then connected for a two-run shot down the left-field line in the seventh inning off Tony Watson (5-2) to put the Padres ahead 9-8 after Rod Barajas had given the Pirates a short-lived lead with an RBI single in the sixth.

"You want him walking out of it with a positive building block," Hurdle said. "If you take him out, it leaves doubt. But the move didn't work and it falls on me. Obviously, we felt he could get out of it."

McDonald's second-half woes continued as he was tagged for seven runs and seven hits in 4 1-3 innings. He is 1-2 with an 8.71 ERA in six starts since the All-Star break after going 9-3 with a 2.37 ERA in 17 first-half starts.

"It's unacceptable," McDonald said of blowing a six-run lead. "It shouldn't happen. I let my guys down. Nobody feels worse than me. When you've got a lead like that, you've got to stay hungry and I didn't do that. I let them back in the game because I didn't execute my pitches."

San Diego ran its winning streak in Pittsburgh to 10 games and hasn't lost at PNC Park since Sept. 18, 2009. The Padres have won five straight games overall.

"This is my favorite place to play on the road because it's such a beautiful ballpark and I have a lot of family here," said Headley, whose parents grew up in Meadville, Pa., about 90 miles north of Pittsburgh, before moving to Colorado.

"It's always exciting for me to come here and it seems like the whole team gets excited," he said. "I don't know the exact reason why but we always seem to play our best baseball here."

Headley went 2 for 4 and is hitting .333 with five home runs and 13 RBIs in his last 12 games.

Brad Brach (1-2) got his first major league win, allowing one run in two innings while striking out three. Huston Street pitched a 1-2-3 ninth for his 21st save in as many opportunities.

Street strained his right calf on the final play of the game as he broke to cover first base on pinch-hitter Michael McKenry's ground ball to the right side of the infield. First baseman Yonder Alonso wound up making the play himself when Street pulled up.

Alexi Amarista of the Padres had two hits and two RBIs, including a home run to lead off the game, his fifth.

Travis Snider hit a three-run homer for the Pirates, his first since being acquired July 30 in a trade. Garrett Jones homered for the Pirates and Pedro Alvarez had two hits and two RBIs.

The teams traded big innings while batting around with San Diego scoring six runs in the fifth off McDonald to tie the game 7-7 after Pittsburgh had a five-run fourth.

The Pirates got their five runs in the fourth on Snider's three-run home run and Alvarez's two-run single.

San Diego starter Edinson Volquez didn't make it out of the fourth inning as he was charged with six runs in 3 1-3 innings while allowing seven hits and four walks with three strikeouts. He has a 13.50 ERA in his last three starts, giving up 15 runs in 10 innings after going 3-0 with a 1.55 ERA in his previous six starts.

After Amarista gave the Padres a 1-0 lead, the Pirates moved in front as Starling Marte singled home a run in the second and Jones homered in the third.

"It's tough to lose a game like this but there aren't too many seasons where you don't have a game or two like this and maybe a lot more if you don't have a good club," Hurdle said. "We'll claw back, though, because that's what we do."

Notes: RHP A.J. Burnett (14-3, 3.19) will try to become Pittsburgh's first 15-game winner since Todd Ritchie in 1999 when he pitches against San Diego RHP Jason Marquis (5-6, 4.10) on Saturday night. Burnett has won 13 of his last 14 decisions and Marquis has won four of his last five starts. . San Diego rookie C Yasmani Grandal, on the DL with a strained oblique, hit off a tee before the game and is expected to take batting practice on the field Saturday. The Padres, though, have yet to set a timetable for his return. ... Because of the spacious left-field gap at PNC Park, Black had LF Will Venable and RF Carlos Quentin switch positions.