After Danny Espinosa reached base on an infield single to load the bases, Brock Peterson hit a grounder that hit the third-base bag for an infield single, scoring Jayson Werth. Scott Hairston followed and also had an infield single, scoring Ramos.
Kelly left the game in favor of Seth Maness, who allowed a sacrifice fly to Nate McLouth to make it a four-run game.
Maness was still on the mound when Washington added to its lead in the fourth inning. Anthony Rendon scored on a single by Werth, while Zach Walters and pinch-runner Steven Souza scored on a double by Ramos.
In the sixth inning, with right-hander Sam Gavigiglio on the mound, Koyie Hill made it a nine-run game when he singled to right field, scoring Souza and Chris Snyder.
Stephen Strasburg started for Washington and was solid, allowing a run in three innings. The Cardinals scored their only run in the first inning, when Allen Craig singled to left field, scoring Peter Bourjos.
Up next for the Nationals: The Nationals return to Space Coast Stadium to play a night game against the Astros on Monday. The last time they faced each other was Friday with the Nationals winning the game, 8-5. Left-hander Gio Gonzalez will make the start for Washington. He is expected to pitch at least three innings.