PHOENIX (AP) Wilson Ramos delivered yet another big game to keep the Washington Nationals rolling Tuesday night.
Ramos lifted his average to .331 with two hits, including a key three-run homer, to help the Nationals beat the Arizona Diamondbacks 10-4.
Ramos connected for his 16th home run with two outs off Diamondbacks starter Robbie Ray (5-11). Chris Heisey followed with a solo shot, marking the 13th time the Nationals have hit back-to-back home runs this year.
''I've been trying to concentrate on hitting the ball up the middle when I have runners in scoring position,'' Ramos said. ''I was looking for the pitch (Ray) struck me out with earlier, a slider. He threw it and I was looking for it, and I took advantage of it.''
Ramos matched his career high set in 2013. Jayson Werth added a solo homer in the seventh off reliever Randall Delgado, one of his three hits.
Ramos has played in 91 games this season and looks like he'll get to 100 for just the third time in his seven-year career.
''Look, it makes me feel good that I've been able to stay healthy,'' Ramos said in Spanish. ''That's been the biggest difference than in previous years. I don't think about the numbers, I just try to help the team.''
Tanner Roark (11-6) struck out six and allowed three runs on seven hits over 6 1/3 innings.
Yasmany Tomas homered for the Diamondbacks, his 18th. Jake Lamb hit his 22nd, a solo shot in the sixth.
Ray struck out nine over six innings but allowed five earned runs and eight hits. He walked two.
''The strikeouts are great but they do produce a lot of pitches,'' Diamondbacks manager Chip Hale said. ''When (Ray) gets a couple of guys on he cannot make that mistake. Three-run home runs are tough to come back against.''
The Diamondbacks have been outscored 38-8 in their last three games and lost 16 of 21 overall.
''It's been a lot of fun to watch,'' Roark said of his team's offense. ''That's what's great about this team, is we're not too selfish.''
The Nationals scored first after Trea Turner led off the game with a single and reached third on an error. Daniel Murphy's groundout drove in Turner for a 1-0 lead.
Arizona responded by loading the bases with none out in the bottom of the first but managed only a single run. Jean Segura scored on Lamb's double-play grounder. Segura has scored a first-inning run in six of his last seven games.
Tomas' homer landed in the left-field seats to give the Diamondbacks a 2-1 lead in the second. The Nationals drew even at 2 with Wilmer Difo's two-out single in the fourth to drive in Anthony Rendon.
Ramos gave Washington a 5-2 lead, Heisey made it 6-2 and, after Lamb's long drive that bounced into the pool in right field, Werth cleared the wall on a line for a 7-3 Nationals lead.
Washington scored three more in the eighth, when Werth, Murphy and Rendon each drove in a run with a single.
''Ramos has been a godsend,'' Nationals manager Dusty Baker said. ''I can't imagine not having him, because he's figured it out.''
The temperature inside Chase Field, with the roof closed in the summer as usual, was 79 degrees at first pitch. Outside, it was 74 degrees. A monsoon-like storm with lightning swept through greater Phoenix just before the game and lowered the air temperature some 30 degrees below the normal average in August, though humidity was high.
Nationals: OF Bryce Harper was a late scratch from the starting lineup due to illness. Baker said he hopes Harper can play Wednesday after receiving IVs Tuesday. ... 1B Ryan Zimmerman remained out with a wrist injury. ... Ramos took a ninth-inning foul ball off the chain around his neck, but remained in the game. ''It broke the chain, that's why I was on the ground for so long,'' Ramos said. ''I was trying to pull it off me. It cut me a little bit. It was stinging.''
Diamondbacks: RHP Rubby De La Rosa threw to rehabbing teammates Chris Herrmann and A.J. Pollock. De La Rosa is coming back from right elbow inflammation.
Nationals: RHP Max Scherzer (11-6) is scheduled to face his former team on Wednesday afternoon. Scherzer is 2-0 in three career appearances against Arizona.
Diamondbacks: RHP Zack Godley (3-1) makes his sixth start of the season. Godley allowed three earned runs in a no-decision at Los Angeles last Friday.