Lannan (3-5) entered the game 0-10 with a 6.44 ERA against Philadelphia. On a stifling day with temperatures well into the 90s, Lannan pitched into the sixth inning, allowing just an unearned run and four hits to record his first victory in his last eight starts.
Todd Coffey, Doug Slaten, Tyler Clippard and Drew Storen held the Phillies scoreless over the last 3 2-3 innings. Storen earned his 10th save in 11 opportunities.
Washington manager Jim Riggleman misspelled Lannan's name on the lineup card posted in the clubhouse before the game. "Lannen" was helped by some excellent fielding by his teammates, who took the last two games of the three-game series against the vaunted Phillies.
After scoring 10 runs on Tuesday night - six against Cliff Lee - Washington got two off Roy Oswalt (3-3), who hasn't won since April 21.
The Nationals scored in the bottom of the first when Roger Bernadina led off with a single. Ian Desmond bunted him to second and he scored on Jayson Werth's one-out single to left.
The Phillies tied it in the top of the second when Ryan Howard doubled, Ben Francisco drew a walk and, with one out, Carlos Ruiz hit a grounder to third. Alex Cora booted the groundball for an error and Howard came in to score.
In the top of the third, Lannan hit John Mayberry with a pitch. He stole second before Howard's one-out single to short right, where Danny Espinosa had shifted. Mayberry tried to score from second, but Espinosa's throw to the plate was in time for the out.
Nix homered to right center field with two outs in the fourth - his ninth of the season.
Nix saved the lead in the top of the sixth. With the bases loaded and two outs, Domonic Brown hit a fly ball to left field. Nix made a diving catch to his left to end the inning.
Lannan exited three batters earlier, pitching 5 1-3 innings. He allowed an unearned run and four hits with three walks, striking out one and hitting a batter - and yet it was good enough.
Oswalt allowed two runs and six hits in five innings. He walked two, struck out three and also hit a batter.
NOTES: Phillies SS Jimmy Rollins did not start for just the second time this season. He pinch-hit for Wilson Valdez in the sixth ... Nationals GM Mike Rizzo said that Bryce Harper, last year's first draft choice, is not ready to be promoted from Class-A Hagerstown. "He'll be moved at some time. We're just not at the point where he's ready to move yet," Rizzo said. Harper is batting .331 with 11 homers and 36 RBIs. ... Rizzo said he hasn't written off 1B Adam LaRoche, who's on the DL with a torn labrum in his left shoulder. "I'm not going to worry until I have to worry. Right now, he's on a two-week shutdown and a two-week ramp up," Rizzo said. ... Cora left the game after four innings with "stomach issues." Jerry Hairston, who was spiked by Valdez in the fifth, replaced him. ... Washington 1B Michael Morse extended his hitting streak to 10 games.