PHOENIX (AP) -- Ian Desmond likes to be aggressive early in the count, often swinging at the first pitch.
Facing a side-arming right-hander, one who had not allowed a run in 19 games, Desmond's approach worked out quite well for the Washington Nationals.
Desmond and Tyler Moore each lined two-run singles off Brad Ziegler in the ninth inning, helping the Nationals beat the Arizona Diamondbacks 5-1 on Wednesday to salvage what started as a difficult road trip.
"He's really good, has some good numbers over the past few years, has been effective," Desmond said of Ziegler. "I just wanted to make sure I got something up in the zone and let the hands do the work."
Washington had a hard time solving Brandon McCarthy, who locked into a pitcher's duel with Doug Fister for the first seven innings.
Ziegler (0-1) hadn't allowed a run in 18 1-3 innings, so pulling off another late-inning victory appeared to be a daunting task.
Denard Span got it started with a gritty at-bat, drawing a walk after fouling off four straight pitches. The Nationals loaded the bases and Desmond came through, lining a single through the left side. Moore followed with another two-run hit, breaking his bat on a single up the middle.
Jayson Werth homered and Tyler Clippard (4-3) tossed one scoreless inning for Washington, which took two of three from Arizona after being swept in Oakland.
"We needed this one," Nationals manager Matt Williams said. "It salvages the road trip. It started off really bad and it's nice to get this one and head home on a positive note."
The Diamondbacks had just come off a solid road trip and McCarthy put them in good position to win four straight series for the first time in nearly three years.
Arizona lost to Washington in the ninth inning Monday night, and then had a surprising meltdown in the series finale by one of baseball's best relievers over the past few seasons.
Aaron Hill homered and made several spectacular plays at second base for the Diamondbacks.
"I had a lot of swing and misses over the top and a lot of balls chopped foul," Ziegler said. "I felt like I had decent stuff. Just didn't execute pitches that well."
Fister was sharp after a rough debut for the Nationals.
Acquired from Detroit in an offseason trade, the right-hander spent the first six weeks on the disabled list with a back strain. He returned Saturday against Oakland and was hit hard, allowing seven runs and nine hits in 4 2-3 innings.
Fister worked around a couple of baserunners the first three innings until Hill, swinging on a 3-0 pitch, hit a drive to left for his fourth of the season.
Fister allowed five hits and struck out six before being lifted for a pinch hitter in the eighth inning.
"Great job by Doug," Desmond said. "After his last start, I'm sure he needed that one. He did an excellent job of keeping the ball down, using his sinker a lot."
McCarthy was hit hard by the White Sox on Saturday, giving up seven runs and nine hits in 3 1-3 innings.
The veteran right-hander was sharp against the Nationals.
Keeping them off balance with big breaking curveball, McCarthy was perfect until Desmond led off the fifth inning with an infield single up the middle.
Washington had a runner on third with one out in the sixth after an error on Arizona shortstop Chris Owings and a sacrifice bunt, but Hill saved a run with a diving stop in the hole on a hard-hit ball by Anthony Rendon to end the inning.
Hill nor anyone else had a chance to reach Werth's tying homer in the seventh inning, a screaming liner to right-center that got out in a hurry.
McCarthy continued to get outs after that and got some more help in the eighth from Hill, who dived and scooped the ball in the same motion on a slow roller by pinch-hitter Kevin Frandsen.
McCarthy allowed two hits and struck out seven in eight innings.
"Some of the changes I wanted to make off last week I felt I was able to execute and do a better job, and make it a high priority," McCarthy said. "The results kind of followed after that."
NOTES: Arizona LHP Randy Wolf exercised the out clause in his contract and was granted his release. The 37-year-old signed a minor league contract with the Diamondbacks after missing last season due to reconstructive elbow surgery. ... Washington leads the majors in run differential from the seventh inning on at plus-38. ... Arizona has Thursday off before RHP Wade Miley opens a three-game series against the Dodgers on Friday. ... Washington has Thursday off and has yet to announce a starter for the start of a three-game series against the New York Mets on Friday.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.