CHICAGO — The Chicago Cubs had been scoring in bunches lately.

Then Sonny Gray took the mound for the Cincinnati Reds.

The Cubs were shut down by Gray and two relievers Tuesday night, falling 4-2 to the Reds in a loss that hurt their playoff positioning.

Chicago had won five in a row, outscoring its opponents 59-18 during the stretch. But it managed just two runs against Gray (11-7) before Michael Lorenzen and Raisel Iglesias closed out the five-hitter for Cincinnati.

"Sonny just keeps pitching great," Reds manager David Bell said. "He went deep into the game against a great lineup. It doesn't really matter who he's facing right now, the best teams, the best lineups. He's pitching with that much confidence."

The Cubs (82-69) dropped into a tie for the second NL wild card with Milwaukee, which held off San Diego for a 3-1 victory. They also missed out on an opportunity to gain ground on NL Central-leading St. Louis, which lost 6-2 to Washington.

Rookie Aristides Aquino hit his 16th homer for Cincinnati (71-81), and Joey Votto and Eugenio Suárez each drove in a run.

Gray struck out nine in 6 2/3 innings. The All-Star right-hander improved to 5-1 with a 1.46 ERA in his last nine outings

"I felt pretty good out there today after I kind of got going," Gray said.

Yu Darvish (6-7) struck out 13 in seven innings for Chicago, but was hurt by a slow start. Kyle Schwarber had three hits and two RBIs.

Darvish fanned 14 in his previous start, a 4-1 win at San Diego on Thursday. He has 217 Ks in 170 1/3 innings on the year.

"Yu is on quite a run right now, but unfortunately their guy is really good, too," Cubs manager Joe Maddon said. "In spite of us swinging the bats well lately, Sonny did a nice job also."

Gray departed with runners on the corners, and Lorenzen struck out Nicholas Castellanos to end the inning.

Lorenzen then worked the eighth before Iglesias pitched a perfect ninth for his 32nd save.

Darvish struck out the side in the first, but Cincinnati scored three times. Votto doubled home Josh VanMeter before Aquino hit a drive to left-center for his first homer since Sept. 2.

Aquino, who was recalled from the minors on Aug. 1, has six homers against Chicago in six games.

"I made a good pitch to Votto, but he's a great hitter," Darvish said. "For Aquino, that's my mistake. I should throw a breaking ball."

Gray helped himself in the fifth, reaching on a one-out single and eventually coming around on Suárez's base hit to give Cincinnati a 4-2 lead.

All-Star catcher Willson Contreras started at first base in Chicago's second game since Anthony Rizzo sprained his right ankle during Sunday's 16-6 victory over Pittsburgh. Rizzo is wearing a walking boot for five to seven days, casting doubt on the slugger's availability for the rest of the season.

Schwarber drove in Castellanos with a double in the first and a triple in the third.

TRAINER'S ROOM

Reds: Votto was back in the starting lineup after missing two games with an illness. ... SS José Iglesias (sore back) was out of the lineup for a fourth straight game, but pinch-hit in the ninth and struck out. ... INF Freddy Galvis missed his third straight game with left knee soreness. Bell said Galvis could return this weekend.

Cubs: RHP Craig Kimbrell (elbow inflammation) threw 16 pitches in a simulated inning. Maddon said the closer's session "was very encouraging," but cautioned the team needed to wait until Wednesday to evaluate Kimbrel's response before determining a next step. ... All-Star SS Javier Báez (hairline fracture in left thumb) will visit with doctors this week in advance of resuming training activity. Báez expected to miss the rest of the regular season. ... RHP Brandon Kintzler (right oblique strain) could resume throwing in the next few days, pitching coach Tommy Hottovy said.

UP NEXT

Reds right-hander Tyler Mahle (2-11, 5.11 ERA) faces Cubs left-hander Jon Lester (13-10, 4.59 ERA) in the series finale Wednesday night. Lester has allowed 15 runs (12 earned) over 10 1/3 innings in his last two starts.