PITTSBURGH -- Neil Walker was looking for a pitch to drive, and he found one.
Walker hit a two-run homer in Pittsburgh's three-run eighth inning and the Pirates beat the Arizona Diamondbacks 4-3 on Sunday to complete a three-game sweep.
Andrew McCutchen hit a leadoff drive in the first and finished with two hits for Pittsburgh, which has won five of its past six home games. The majors' worst team earned its first three-game sweep since May 4-6 against the Chicago Cubs.
"It's definitely been a long while," McCutchen said. "Walker delivered in a big way and put us up. It was good just to be there and be a part of it and just to not give up, keep fighting and get those three wins and sweep."
Pittsburgh (51-98) remains two losses away from its first 100-loss season since 2001 but managed to pick up its first sweep of any kind since taking both games from the Cubs from May 31-June 1.
"I was thinking to just try to hit one in the gap somewhere and possibly get a chance to score Jose," said Walker, who had two homers and five RBIs in the series. "And instead I was fortunate enough to get one in the air and hit one on the barrel.
"We know we're not going to make the playoffs but situations like these can bring teams closer together."
Arizona also had a 3-2 lead in the seventh inning of the series opener Friday night, and lost that one 4-3.
"We've had a tough road trip where we've wasted several efforts," manager Kirk Gibson said. "Especially two of them here."
McCutchen hit Hudson's first pitch over the wall in straightaway center but that was it for the Pirates against the right-hander, who allowed three hits in 6 1/3 innings.
"A guy jumps on a first-pitch fastball, it's nothing to really hang your head about," Hudson said. "It's the first pitch of the game; you've still got to go out there and get the next couple guys out and put a couple zeros up after that."
Pitching perhaps to keep his turn in the rotation -- and, in a larger sense, for a shot at a 2011 roster spot with the Pirates -- Duke had his best outing in five starts. Duke was tagged for 11 earned runs in 4 1/3 innings over his previous two starts, but he allowed six hits and a walk in this one.
"I've had a couple bad starts before," Duke said. "There's a mental battle all the time, that's part of the job, so I'm prepared to deal with it. It's nothing new. ... To get a win, that's the main thing."
McCutchen's drive was his 16th of the season and third in his past five games.
"We're still playing hard," Pirates manager John Russell said. "They're bouncing around and the attitude's really good. That's a good sign for a young team. They're not just waiting for that last day of the season. I think a lot of them wish we could continue to play -- and that's a good thing."
Diamondbacks OF Justin Upton was not in the lineup for the 15th time in the past 17 games because of left shoulder soreness. ... The sweep was the fourth by the Pirates this season. ... Pittsburgh entered this series having lost four straight and seven of eight.