WASHINGTON -- A day after Stephen Strasburg's dominating performance, left-hander John Lannan went to the mound and had one of his worst outings on Wednesday night. However, the bullpen and the position players helped the Nationals defeat the Pirates, 7-5, in front of 18,876 fans at Nationals Park.

It was Washington's second consecutive victory as it improved its record to 29-31.

The game was tied at 5, when the Nationals scored the winning run in the bottom of the seventh inning off right-hander D.J. Carrasco. With Cristian Guzman on second base, Ryan Zimmerman hit a comebacker off Carrasco's right ankle as the ball ricocheted into right field for a base hit, scoring Guzman.

"You get lucky sometimes," Zimmerman said. "The second baseman was playing right up the middle. He was probably going to field it and easily throw me out. It bounced off Carrasco and went all the way to the outfield. Those are the breaks we couldn't get lately."

Washington added to its lead against reliever Brendan Donnelly in the next inning, when Josh Willingham scored on a sacrifice fly by Wil Nieves.

Washington's relief corps was able to secure the victory. Tyler Walker, Drew Storen, Tyler Clippard and Matt Capps pitched a combined 4 1/3 scoreless innings and allowed just two hits.

"The first couple of weeks [of the season], the relievers were trying to find their way a little bit, but they have done great job," manager Jim Riggleman said. "We had to call on them little more than we've liked.

"Storen has been up a lot. He has been in games quite a bit since he has been here. Clipp's appearances speaks for itself. He has done a lot of work. Capps has been in situations where he is in for the save. He has been in there quite a bit. Those guys are hanging in there. They're doing a great job, but we have to call on some other people soon, too."

The Nationals called on Walker, who is almost never in close games. This time, Walker entered the game in the fifth inning with one out after Pirates starter Brad Lincoln tied the score at 5 with a single. Walker pitched 1 1/3 innings. Entering the game, Walker inherited 18 runners and 12 of them scored.

"It was a bullpen shutout. That's what we were looking for," Walker said. "We came in and picked up Johnny. He didn't have his best stuff tonight. You come in and you want to pick him up. You want to help out your teammates. Tonight, I was able to get that job done. I had been struggling in that situation lately -- [with] inherited runners. I was really trying to bear down and get us off the field, so we could get back to hitting."

Storen ended up getting the win, while Capps closed the door for his Major League-leading 20th save. It was Capps second straight save against the team that non-tendered him after last season.

"Two saves against anybody is good, but it's kind of nice to get them against the team that didn't want you anymore," said Capps. "You want to show them you could still pitch and get the job done. I knew what I was capable of when I found out I was non-tendered. I had to go out and prove it to myself and everybody else this season."

Lannan lasted 4 2/3 innings and allowed five runs -- four earned -- on 10 hits. He said he didn't feel any pressure following up Strasburg's huge performance

"Last night was great. I was glad I was part of it," Lannan said. "Strasburg did great, but that was yesterday. That was his game, and today was my game. It didn't cross my mind that whatever he did last night was going to interfere with what I had to do. Today was my day. I battled. It didn't go my way today."

Washington gave Lannan a 2-0 lead in the first inning when Adam Dunn took a Lincoln pitch and hit a two-run homer.

But Pittsburgh took the lead by scoring three runs off Lannan. Lastings Milledge highlighted the scoring with an RBI single. Neil Walker later added to the Pirates' lead in the fourth with a single to drive in Jose Tabata.

But the Nationals ended up taking a 5-4 lead off Lincoln in the bottom of the inning. Roger Bernadina, Ian Desmond and Lannan had RBI hits.

"I just tried to calm myself down and make a good pitch," said Lincoln, who was making his Major League debut. "That's just baseball. Baseball is a game of inches. We were just unlucky on the defensive side."