Saved by the ivy! Miley slings Wrigley gem

This browser does not support the video element.

CHICAGO -- The battle for the second National League Wild Card spot looks like it could be a nail-biter until the end for the Reds and it will take tension-filled games to decide it.

That's kind of how the Reds' 4-3 victory over the Cubs might have felt Tuesday at Wrigley Field. The win helped Cincinnati pull into a tie for the second National League Wild Card spot after San Diego lost vs. the Angels.

“It was big. We needed the momentum," said Reds second baseman Jonathan India, who opened the game with a leadoff home run.

This browser does not support the video element.

"We needed that as a squad, you know?" starting pitcher Wade Miley said. "We’ve been scuffing a little bit as of late, and can’t credit enough the infield defense and the offense early."

Two batters after India's homer in the first inning, Nick Castellanos walloped a drive to center field for his 27th homer of the season and a 2-0 Reds lead. According to Statcast, Castellanos' long ball traveled a projected 446 feet with 108 mph exit velocity.

This browser does not support the video element.

Miley, who improved to 12-5 with a 2.89 ERA in 26 starts this season, was effective throughout the evening. Leading with his cutter, as he often does, he threw 101 pitches, garnering 53 swings. Hitters whiffed 21 times, with the only big contact coming on Willson Contreras' solo homer to left-center field on an 0-1 slider in the third inning.

"My command had been getting a little squirrelly, and I feel like I was really strong out there and it was fun. It was definitely fun," Miley said. "Probably the best cutter I’ve had in a while, and you have to give a lot of credit to Tucker [Barnhart] for putting the right fingers down and believing in me and just sticking with me throughout that process."

The left-hander also benefited from an unexpected assist by some of that iconic Wrigley Field ivy.

Cincinnati held a 2-1 lead in the bottom of the sixth when Patrick Wisdom's hit to left field landed in the ivy-covered fence on the fly. Left fielder Max Schrock could not locate the ball and raised his arms in the air to stop play, which made the hit a ground-rule double. Because of that, Ian Happ could not score from first base and had to go back to third. Had the ball bounced out, Happ would have easily scored.

This browser does not support the video element.

"It was beautiful," Miley said. "The ball got hung up in there. Off the bat, I thought it was two-run homer, and it worked out. Got stuck in the ivy and got to stay there, so it was huge."

Cincinnati picked up a pair of insurance runs against reliever Manuel Rodríguez in the eighth inning. India was on second base with a leadoff double when Joey Votto was intentionally walked with two outs. Mike Moustakas hit an RBI single through the right side and Kyle Farmer followed with an RBI single up the middle to make it a two-run game.

This browser does not support the video element.

"Those add-on runs, you just felt how important they were at the time," Reds manager David Bell said. "Great at-bats and big hits from both of those guys, Moose and Farm."

This browser does not support the video element.

It certainly proved important in the bottom of the eighth when Michael Lorenzen gave up a pair of solo homers. Rafael Ortega led off by hitting a pinch-hit homer. Gone was Lorenzen's 48 2/3 innings streak without giving up a homer, which had been the longest active streak in the Majors.

The next batter, Frank Schwindel, hit a pop-up to no-man's land in short left-center field. Farmer ran back from short and made a spectacular over-the-shoulder catch before landing flat on his back.

This browser does not support the video element.

“That was unbelievable," India said. "That was the best play he’s made all year. I think it was the best play a shortstop made all year. No one really knows, except infielders, how hard those plays are."

That catch meant that Happ's one-out homer was a solo shot that made it a one-run game, rather than tying the score. Mychal Givens gave up a two-out hit in the ninth, but he still secured his sixth save.

This browser does not support the video element.

"Guys are going to get hot again, the offense is going to get hot again. It’s going to be fun," Miley said. "But down the stretch, it’s going to be playoff baseball. That’s what it looks like a lot of times, so you just have to go out, and it doesn’t matter what the score is, you just need more runs at the end of the game than the other team. Hopefully, we can do that."

More from MLB.com