PITTSBURGH -- Matt Williams decided to intentionally walk a cold hitter to face a hot hitter and the Washington Nationals rookie manager got burned.

James Harrison singled in the winning run in the two-run seventh inning as the Pittsburgh Pirates rallied to beat the Nationals and ace Stephen Strasburg 3-2 on Saturday night.

The Nationals led 2-1 when catcher Russell Martin led off with a single and took third on left fielder Starling Marte's two-out double. Pinch-hitter Jose Tabata tied it with a sacrifice fly.

Williams decided to intentionally walk left-handed pinch-hitter Travis Snider, although he was hitting just .214, to get a right-right matchup with Strasburg (3-4) against Harrison, a utility player who has taken over as the regular right fielder during the past week with Tabata and Snider both slumping.

Harrison grounded a single up the middle that scored Marte with the go-ahead run and is hitting .328 in his last 24 games.

"We're going to be careful there," Williams said. "(Strasburg) had pitched well to Harrison all night and you don't want to get in a situation where he falls behind and has to throw a fastball to Snider."

Harrison said he had a feeling Snider might be walked, too, but was ready to step in against Strasburg despite being 0-for-3 to that point.

"I had three at-bats already and I'd seen everything he was throwing," Harrison said. "I'm just looking for a pitch I can barrel up there and I got it."

The Pirates won their fourth consecutive games and the Nationals dropped their fourth straight to fall below .500 for the first time this season at 24-25.

"It was a tough challenge for all our hitters tonight, but I thought we kept battling," Pittsburgh manager Clint Hurdle said. "We kept going out there and tried to make (Strasburg) work."

Jared Hughes (3-1) pitched one perfect inning for the win and Mark Melancon worked a 1-2-3 ninth for his ninth save of the season.

Strasburg gave up three runs and seven hits in seven innings with two walks and seven strikeouts. He had his seventh consecutive quality start but fell to 0-3 in five road starts.

"It's a tough loss," Strasburg said. "We're all trying very hard, trying to get back on track. It is what it is. I do think we've probably reached the point where we're trying too hard and need to take a step back and let the game come to us."

Pirates starter Gerrit Cole went six innings and allowed two runs, five hits and three walks while striking out seven. He has struck out at least six in seven of his 10 starts this year.

"They battled me, had some long at-bats and that really ran my pitch count up," Cole said. "I was hoping to pitch deeper in the game, but (the Nationals) wouldn't allow it."

Strasburg was the first overall pick in the 2009 amateur draft and Cole was the top pick in 2011, marking the first time two No. 1 overall picks started against each other since Aug. 21, 2012, when the Kansas City Royals' Luke Hochevar faced the Rays' David Price at Tampa Bay.

The last National League game to feature two No. 1s came on May 16, 2005, when the Mets' Kris Benson and the Cincinnati Reds' Paul Wilson squared off in New York.

Martin and Marte had two hits for the Pirates and second baseman Neil Walker homered.

First baseman Greg Dobbs had two hits and shortstop Ian Desmond hit a home run for the Nationals, who have scored just seven runs during their four-game skid, going 2-for-27 with runners in scoring position and leaving 35 runners on base.

NOTES: Washington optioned INF Zach Walters to Triple-A Syracuse after the game to clear a roster spot for Adam LaRoche, who will be activated from the 15-day disabled list Sunday for the finale of the four-game series. LaRoche has been out since May 10 with a strained right quadriceps. ... Nationals LHP Gio Gonzalez reported no problems Saturday after playing catch for the first time since being placed on the disabled list last Sunday with left shoulder inflammation. ... Pittsburgh manager Clint Hurdle was not ready to commit to RHP Jason Grilli as the full-time closer, though he pitched a scoreless ninth inning on Friday night for the save in his first appearance since April 20, the day before he went on the DL with a strained left oblique. Washington RHP Doug Fister (1-1, 3.93 ERA) faces Pittsburgh LHP Francisco Liriano (0-4, 4.86) on Sunday.