New York: Catcher Wilson Ramos and third baseman Anthony Rendon hit home runs during a four-run fifth inning an the Nationals beat the Milwaukee Brewers 9-5 on Sunday to avoid losing more ground in the National League East. The Nationals (62-61) had begun the game five behind the first-place New York Mets.

Washington had seven extra-base hits, including five doubles, and drew seven walks. “If we keep winning series we will be just fine,” said Bryce Harper, who two doubles. “We had good at-bats.” Left fielder Jayson Werth, recently moved to the leadoff spot, had a double, drew two walks and scored twice.

“Offensive approach is important. Jayson saw a lot of pitches,” said Washington manager Matt Williams, whose team saw 148 pitches.

Ramos had two hits while Rendon drove in three runs with his homer and walked and scored twice for the Nationals.

“They had a bunch of walks,” Brewers manager Craig Counsell said. “They had two-out hits that extended innings and they had some big two-out hits.” Washington scored four runs in the fifth to build the lead to 9-3.

Ramos hit a solo homer, his 10th of the year, off starter Matt Garza (6-14), and Rendon smashed his three-run shot into the Brewers bullpen in left against reliever Corey Knebel.

Brewers left fielder Khris Davis hit a solo homer in the eighth, his ninth of the month, off former closer Drew Storen to trim the margin to 9-5.

But new closer Jonathan Papelbon got the last three outs in the ninth in a non-save situation.

Washington starter Jordan Zimmermann (10-8) gave up four runs and eight hits in 5-2/3 innings.

“They made me battle,” Zimmermann said. “I threw a lot of pitches. My pitch count was up.”