MILWAUKEE -- Washington manager Frank Robinson hopes his team has put an end to its recent struggles.
The victory was just the third in the past 10 games for the first-place Nationals, who remained 1½ games ahead of Atlanta in the NL East.
"I hope this is the end of the slide," Robinson said. "I'm confident we'll get back on track. It was really nice to get this one."
With the game tied at 3, pinch-hitter Carlos Baerga led off the seventh with a single. Ryan Church walked with one out and the runners advanced on Ricky Bottalico's wild pitch. Jose Vidro grounded out, but Guillen lined a single to center field to score Baerga and Church.
"I was just trying to make contact and put the ball in play," said Guillen, who added that he played with a sore shoulder. "This was a huge win for us. It will help us get our confidence back."
Robinson said he was surprised the Brewers pitched to Guillen with first base open.
"He's the guy you want to see at the plate at that time," Robinson said. "He always has a chance to make something special happen. And more times than not, he gets the job done. That was a huge hit."
Brewers manager Ned Yost said he liked the Bottalico-Guillen matchup.
"He just made a pitch that he didn't want to make," Yost said. "He just threw a pitch that caught too much of the plate."
Jose Vidro homered and Vinny Castilla added two run-scoring doubles for the Nationals.
Esteban Loaiza (6-5) allowed three runs and seven hits in six innings. Gary Majewski and Mike Stanton each pitched a scoreless inning before Chad Cordero pitched the ninth to earn his major league-leading 32nd save.
Bottalico (2-2) took the loss as the Brewers had their four-game winning streak snapped. Starter Chris Capuano gave up three runs, including's Vidro's homer, in six innings.
"I thought I had good enough stuff to win," Capuano said. "I was happy with the way I pitched with the exception of the 0-2 fastball right down the middle I threw to Vidro."
The Nationals took a 1-0 lead in the second. Preston Wilson drew a one-out walk and scored on Castilla's double. Brewers outfielder Brady Clark got a glove on the ball at the top of the wall, but the ball popped out.
The Brewers scored twice in their half of the second. Geoff Jenkins singled with one out, advanced to second on a wild pitch and scored on a two-out single by Damian Miller. J.J. Hardy followed with a double to drive in Miller for a 2-1 lead.
Wilson walked again and scored on another double by Castilla to tie it at 2 in the fourth. Vidro led off the sixth with his fifth home run of the season, a 423-foot drive to center, to give the Nationals a 3-2 lead.
The Brewers tied it in the sixth with two outs. After Jenkins and Bill Hall singled, Loaiza struck out Miller, but the ball went through the legs of catcher Gary Bennett for a wild pitch and Jenkins scored from third base.
Jenkins' second-inning single extended his hitting streak to nine games. ... Vidro lost control of his bat as he swung and missed at a pitch in the third inning. The bat ended up about 20 rows behind the Nationals' dugout. ... Capuano picked Guillen off first base in the sixth inning, his 10th pickoff of the season to lead the majors. ... Brewers LHP Dana Eveland, called up from Double-A Huntsville on Friday, made his major league debut in the eighth inning and pitched 1 2/3 scoreless innings.