MILWAUKEE (AP) -- After going hitless in his first six at-bats Sunday, Milwaukee's Gabe Kapler was ready to spend a long night at home pondering his poor play. Instead, he gave himself and the Brewers something to remember.
The reserve outfielder homered off the pole in left leading off the 13th inning and the Milwaukee Brewers came back from a late three-run deficit for a 5-4 victory over the Nationals.
"Today's game was, overall, not a comfortable game from a personal standpoint," he said. "I didn't feel very good overall."
In his first six at-bats, he went 0-for-6, striking out twice, reaching once on an error and only getting one ball out of the infield.
"I knew that barring something like that happening for me, I was probably going to go home and have a pretty rough night," he said. "Now, I can go home and look forward to tomorrow. It's a nice feeling."
Kapler's shot off Luis Ayala (1-8) was his first career walk-off homer and gave Milwaukee its fifth consecutive victory.
Ayala, who had just entered the game, has a 6.04 ERA.
"We can't even hide him now," Washington manager Manny Acta said. "He comes into situations like this and he's just not making pitches."
Starting for the injured Ryan Braun, Kapler watched intently from near the plate as the ball hit the pole, then quickly jogged around the bases.
"At first I thought it was going to stay fair for sure, then I saw it had kind of had a little lean to it," he said. "I wasn't positive whether it would stay fair. I'm glad it did."
The Brewers had chances to end it earlier, but stranded the winning run on second base in the ninth and 11th innings, and left the bases loaded in the 10th. The team was 3-for-15 with runners in scoring position and left 16 on base.
"We had opportunities to score there every inning," Milwaukee manager Ned Yost said. "We just couldn't capitalize on it."
The Brewers tied it in the bottom of the inning on Mike Rivera's three-run double off closer Joel Hanrahan. Reliever Saul Rivera allowed a single to Bill Hall between walks to Prince Fielder and Mike Cameron to load the bases before being replaced by Hanrahan with two outs.
Rivera, making only his 12th start this year, drove the ball to the left field wall, allowing all three runners to score without a play and tying the score at 4.
Rivera was on base five times, going 2-for-3 with three of the Brewers 13 walks. In only 54 at-bats, Rivera is batting .333 with 14 RBI.
"It feels great," Rivera said of his game. "All the time I wait for this kind of moment."
"This guy had a no hitter going into the sixth inning without his best stuff," Acta said. "He ran his pitch count with those five walks, but we're so happy for this kid. We've got a pitcher here. He's got four pitches and he can throw them for strikes."
Bill Hall followed with a sacrifice fly to right that easily scored Kapler from third to tie the score at 1. Kapler reached on a grounder to third, and first baseman Ronnie Belliard was charged with an error when he couldn't handle the throw from Ryan Zimmerman.
Lannan walked five and struck out six in six innings.
Milwaukee starter Manny Parra went seven innings, giving up one run on six hits and no walks while tying a career-high with nine strikeouts.
Guillermo Mota (3-5) pitched the top of the 13th. ... It was Parra's first appearance since he was shoved by Fielder in the dugout during a loss. Fielder apologized saying he should have done a better job of handling his frustration. ... Milledge's RBI single in the sixth extended his hitting streak to 11 games and ended Washington's scoreless innings streak at 27.