CINCINNATI (AP) -- Carlos Martinez kept getting himself into trouble and his defense kept bailing him out.
Randal Grichuk and Kolten Wong homered, and Martinez carried a shutout into the seventh inning with the help of some timely double plays as the St. Louis Cardinals snapped a three-game losing streak with a 5-2 win over the Cincinnati Reds on Sunday.
"Every time a runner gets on base, I just increase my focus," Martinez said. "I was a little bit fatigued, but I never lost focus."
Yadier Molina had two of the five hits for the Cardinals, who avoided being swept in Cincinnati for the first time since July 2012.
St. Louis began the day with a one-game lead over the Mets for the final NL playoff spot. New York was set to host Washington later.
Martinez (13-7) allowed three hits and all of his season-high five walks over six scoreless innings before the Reds reached him for three hits and two runs to knock him out of the game three batters into the seventh. He struck out six while improving to 8-1 in 13 road starts this season.
Cincinnati went on to load the bases with one out against reliever Zack Duke before Scott Schebler flied out. Left fielder Brandon Moss, who went 0 for 4 with three strikeouts, threw out Tyler Holt at the plate - the third of four Cardinals double plays, tying their season high.
"That was a big play," St. Louis manager Mike Matheny said. "When a guy is struggling to put together at-bats, it's important to come up big in big situations. That was a nice tag by (Molina), too."
Reds manager Bryan Price had no problem with the speedy Holt trying to score.
"Offensively, we're down by three runs and you think you're going to be conservative, but you still have to score runs," Price said. "Moss makes a nice play. We had to take a chance with two outs."
Seung Hwan Oh allowed a leadoff single in the ninth before getting three outs for his 15th save.
Tim Adleman (2-3) gave up both Cardinals home runs while matching his career high with six strikeouts in his first career appearance against St. Louis. He allowed four hits and three runs with a walk in five innings.
"Outside of a few pitches, I did a pretty good job of minimizing damage," Adleman said. "It was better today. I wasn't in a lot of jams today. The first (home run) in the second inning, the pitch got too much of the plate. Maybe in another park, it doesn't go out. I don't know. The second one to Wong was a curve over the plate. You have to tip your hat. He did what he was supposed to with it."
Grichuk followed Stephen Piscotty's double with his 21st homer this season and second of the series, giving St. Louis a 2-0 lead in the second inning. Grichuk also homered on Friday.
Wong made it 3-0 by leading off the fifth with his fourth homer this season and second on the road trip. He also connected Monday in Milwaukee.
First baseman Joey Votto's error and pitcher Jumbo Diaz's error and wild pitch helped St. Louis add two unearned runs in the sixth for a 5-0 lead.