CINCINNATI — The Cincinnati Reds kept putting runners on base. Moving them around was more of a problem.

The Reds piled up 11 hits and drew five walks, but the St. Louis Cardinals turned four double plays and made the most of a defensive breakdown by Cincinnati to pull out a 5-2 victory Sunday.

Randal Grichuk and Kolten Wong homered, Carlos Martinez carried a shutout into the seventh inning and St. Louis snapped a three-game losing streak.

Yadier Molina had two of the Cardinals’ five hits as they 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 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 walked five and 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 threw out Tyler Holt at the plate — the third of four Cardinals double plays, tying their season high.

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 homers 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.”

Price, using September as a tryout camp for the last-place Reds, pulled Adleman after 77 pitches. Wandy Peralta made his major league debut with a hitless seventh.

“If this was August instead of September, I wouldn’t have taken Adleman out, but I had four or five guys that needed to pitch,” Price said. “(Adleman had) done enough to keep us in the game.”

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 year 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.

HAPPY BIRTHDAY

Reds All-Star left fielder Adam Duvall was rested on his 28th birthday. He had a pinch-hit single in the ninth.

CLOCKWORK

Fireworks were set off every hour on the hour outside the ballpark as crowds gathered for the city’s annual pre-Labor Day “Riverfest” fireworks show. The 40-year-old event has been known to draw crowds of up to 500,000 people to the banks of the Ohio River. World War II-era warplanes also buzzed the ballpark before and during the game.

TOP DOWN

Reds pitching limited the Cardinals’ first four batters — Matt Carpenter, Jedd Gyorko, Moss and Piscotty — to a combined 5 for 43 with one RBI and six walks in the series.

TRAINER’S ROOM

Cardinals: Ex-Reds catcher Brayan Pena, limited to four games this season by left knee inflammation, was activated from the 60-day disabled list before the game.

Reds: CF Billy Hamilton, leading the majors in stolen bases, exited in the third after straining his left oblique while taking a strike.

UP NEXT

Mets RF Jay Bruce, traded by the Reds to New York on Aug. 1, returns to Cincinnati for the first time in the opener of a three-game series Monday. RHP Robert Stephenson (2-0) attempts to become the first Reds pitcher since Wayne Simpson in 1970 to win his first three career starts.