CINCINNATI -- Reds starter Homer Bailey felt lousy on Sunday but knew that excuse would hold up as well as the dog eating his homework. This was a game and series against the Cardinals that his team had to have -- one way or another.So Bailey turned in a brilliant outing by working into the eighth inning. And while the Reds sputtered on several opportunities, they eventually came through and took a 3-1 victory and two of three in the series. "It's as good as I've pitched. It's definitely not as good as I've felt," Bailey said. "We'll take the wins as they come, right? I think every player goes through that. Some days, they show up and don't feel great. But it doesn't matter. We've got to win. The outcome -- we couldn't have pictured it any better against the Cardinals, being how tight the division is. That was a good bonus for us. Now, we go to Pittsburgh and everything is great." Bailey gave up one run and only three hits over 7 1/3 innings with three walks and four strikeouts. Efficient all the way -- and often taking some velocity off his throws -- he used only 88 pitches. Three-run home runs ruined his day in each of his previous three starts, but the right-hander never put more than one batter one base in any inning. "He just didn't make many mistakes," Cardinals right fielder Lance Berkman said. "He was down in the strike zone and moving the ball pretty well." The only St. Louis damage was Berkman's solo homer on a 2-0 slider in the top of the second. "Warming up before the game, I didn't have anything," Bailey said. "I was all over the place. I didn't even think I was going to make it past the second. But it was a matter of trusting Ryan [Hanigan, his battery-mate], making pitches and having good things happen." Hanigan made something good happen at the plate when he snapped a 1-1 tie in the seventh with a chopped RBI single over the shortstop and into center field. The Reds had been 0-for-7 with runners in scoring position for the day, and 4-for-28 in the series, but that changed after Miguel Cairo came through with a one-out triple off of Cardinals starter Jaime Garcia. "Garcia is tough. We didn't hit him hard," Hanigan said. "I was trying to put the ball in play, trying to get it into the outfield. I found a hole and was fortunate. It was a big run for us." The Reds didn't get to Garcia until the sixth, when some St. Louis mistakes opened the door. Rookie Zack Cozart extended his career-starting hit streak to six games with a one-out single. Joey Votto bounced a grounder to Skip Schumaker, whose flip to second base pulled Ryan Theriot off the bag as Cozart slid. He was ruled safe, which launched an enraged Theriot to ejection for arguing. A Garcia wild pitch as Brandon Phillips struck out moved both runners into scoring position. Garcia then skipped an 0-2 pitch to Jonny Gomes in the dirt, scoring Cozart with the tying run. Upon Bailey's exit with a one-out walk in the eighth, the Reds' bullpen and the defense proved big. Bill Bray gave up a single before getting the second out. Nick Masset entered to face pinch-hitter Yadier Molina, who lofted a broken-bat liner just over the infield dirt, but Phillips made a superb leaping catch to prevent the tying run from scoring. Against Cardinals reliever Lance Lynn, Cozart began the bottom of the eighth with a shot into the left-field seats for his first Major League home run. It was an important cushion because Albert Pujols, Matt Holliday and Berkman were due up in the ninth. Coming off three straight blown saves going into the All-Star break, Francisco Cordero notched a quick 1-2-3 top of the ninth for his 18th save and a secured series. The fourth-place Reds (47-48) finished the weekend 3 1/2 games behind the Brewers in the tightly bunched National League Central. Now they play another foe ahead of them in the Pirates, with three games at PNC Park. "Every game from now on is important," Cordero said. "The next three and all the games we have left. We're not only fighting against St. Louis. We've got Pittsburgh and the Brewers in front of us. We just have to take advantage every time, every opportunity that we have."