SAN DIEGO (AP) -- The San Diego Padres were two outs away from another shutout loss when their bats suddenly came alive.
After Brandon McCarthy threw seven shutout innings, the Padres rallied with three runs in the ninth inning before the Arizona Diamondbacks hung on for a 4-3 win over the Padres on Saturday night.
The Diamondbacks, who came into the game with the worst ERA in the majors at 5.03, were about to throw their second straight shutout against San Diego and the Padres' third in four games.
But then the majors' worst offensive team scored three times - one run more than it had compiled in its three previous games combined - and had the tying and winning runs on base.
"Bats got going in the ninth, which was a good sign," Padres manager Bud Black said. "We had some hard hit balls and we had some hard hit balls in the eighth, too."
Arizona had its scoreless innings string snapped at 24 innings when J.J. Putz allowed a one-out single to Seth Smith and an RBI double to Yasmani Grandal.
Addison Reed then surrendered Jedd Gyorko's two-run homer. After getting an out, Reed gave up Cameron Maybin's double and walked pinch hitter Will Venable. Reed ended the game by getting Xavier Nady on a flyout for his eighth save in nine chances.
Is this a possible sign for a team that entered the game last in the majors in runs per game, on-base percentage, slugging percentage, and was tied for the worst batting average at .213?
"You hope so," Gyorko said. "We have guys up and down the line that have been struggling. Eventually we'll put some hits together and score some runs. It's just a matter of time."
McCarthy turned in his second straight strong start, coming on the heels of a seven-inning, two-run outing with a career-high of 12 strikeouts.
The Diamondbacks (11-22) have won three straight and fourth consecutive road games to raise their road record to 8-7.
"We just need some more timely hitting," said Grandal. "We've been struggling but we still have five more months in the season. You know it's not going to last the whole season."
Said Black: "It's tough when you're going through it but we'll come out of it and hopefully the pitching continues to be as strong as it has been and our hitters start hitting the ball on the nose. When you're going through it, it is not easy."
Ian Kennedy (2-4) allowed three runs on 11 hits over five innings with seven strikeouts and one walk. Kennedy is 1-1 with a 6.06 ERA in three starts against his former team.
The Diamondbacks went ahead 2-0 in the second on Miguel Montero's leadoff homer and consecutive doubles by Chris Owings and Marte.
Arizona tacked on one run in the fifth on three straights singles, including Owings' RBI hit to left, and another in the seventh on Marte's infield single.
Owings and Montero each had three hits to lead the Diamondbacks' 14-hit attack.
Notes: McCarthy had received only one run of support while on the mound in his previous four starts. ... The Padres lead the majors with 21 one-run games (11-10 record). . Montero played his 800th game, the fourth player to reach that mark with the Diamondbacks. ... D'Backs LHP Wade Miley (2-3, 5.36 ERA) will oppose Padres righty Tyson Ross (3-3, 3.68) in Sunday's series finale.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.