WASHINGTON -- A day after manager Frank Robinson criticized the Nationals for a lackluster start, Nick Johnson and Zach Day gave Washington some spark.
Coming off getting two-game sweep by the Florida Marlins, the Nationals built a 3-0 lead after the first inning and cruised.
"You get out front, three runs, that's a big plus for you," Robinson said. "It's good for the psyche. It makes everyone feel a lot better, a lot more confident."
Johnson hit two-run homers in the first off Oliver Perez (1-5) and in the eighth against John Grabow, his third multihomer game and second this season. Johnson was 2-for-2 with two walks.
Claimed off waivers from Colorado on April 26, Day (2-3) had been winless in three starts since April 8, including a 3-1 loss at St. Louis on April 30 in his first game back with the Nationals.
He allowed four hits in seven innings, struck out five and walked none, lowering his ERA from 9.82 to 7.11. Day, who retired his last 10 batters, was traded to Colorado last July.
"It wasn't necessarily my best stuff coming out of the bullpen," Day said. "But we were able to make some adjustments, and I think that was big. That felt good."
Jon Rauch and Felix Rodriguez finished the five-hitter, the first shutout for the Nationals since Sept. 26 at Florida.
Jose Vidro had two hits, including an RBI double in the first inning, and the Nationals won for just the third time in 11 games.
"I felt that it was good," Vidro said of Robinson's message Thursday night. "I think it was needed.... It was very ugly. It was very embarrassing."
Perez (1-5) lost his third straight start, allowing four runs, three hits and four walks in four innings as his ERA rose to 7.71. He has 27 walks in 32 2-3 innings and has not lasted through the fifth in four of seven starts.
Pittsburgh, an NL-worst 8-23, lost its third straight game and dropped to 2-16 on the road. The Pirates are off to their worst start since 1957, when they also started 8-23. They did not advance a runner past second base and were blanked for the second straight game.
"We have not done a very good job over the course of the last several days of driving the ball," Pirates manager Jim Tracy said.
Washington scored three runs in the first on Marlin Byrd's leadoff walk, Vidro's RBI double and Johnson's homer. Jose Guillen added a sacrifice fly in the third.
Johnson homered twice April 20 at Philadelphia. He became the first left-handed batter to homer against Perez this season. ... Day's only previous win with the Nationals was April 20, 2005, against Atlanta. ... Freddy Sanchez hit leadoff for the first time this year and went 0-for-4. ... Entering the game, the Nationals had been outscored 30-17 in the first inning. ... Marlon Anderson left for a pinch runner after being hit on the right knee during a pinch-hitting appearance in the seventh inning. X-rays were negative. ... RHP Ryan Vogelsong pitched three hitless innings for Pittsburgh.