CHICAGO — The up-and-down Pittsburgh Pirates need to right their ship and do it rather quickly.

Kyle Hendricks threw seven dominant innings of three-hit ball to lower the majors’ best ERA to 2.09 and Anthony Rizzo homered to lead the Chicago Cubs past the Pirates 3-0 on Tuesday night.

After a rare four-game sweep in Milwaukee, the Pirates lost their second straight game to fall 2 1/2 games behind the St. Louis Cardinals for the final wild card berth.

“I don’t look (at the scoreboard),” manager Clint Hurdle said. “I gave up a long time ago. It doesn’t help.”

Instead, Hurdle watched Hendricks (13-7) give up three or fewer runs in his 18th straight start. He didn’t allow a hit until Gregory Polanco’s bloop to left-center in the fifth and faced the minimum 17 batters until John Jaso’s two-out double in the sixth.

“All you got to do is look at (Hendricks’) overall numbers, the command, the execution,” Hurdle marveled. “I thought I was back in 1987 with Greg Maddux on the mound.”

Rizzo belted a two-run homer off starter Chad Kuhl (3-2) in the first and Miguel Montero added an RBI single an inning later as the Cubs improved to 84-47.

“It was tough for me in the early going to get in rhythm for whatever reason, but I found myself (later),” Kuhn said.

Carl Edwards Jr. worked the eighth and Aroldis Chapman finished the four-hitter for his 31st save as the Cubs improved to 21-6 this month, one win shy of the best August in franchise history set in 1932.

Hendricks, who began the season as the No. 5 starter, is well ahead of No. 2 Madison Bumgarner of San Francisco (2.49) in the ERA race. He mixed his below-average 90 mph fastball with a dominant changeup and sinker to strike out four.

“It has to be Cy Young contention,” manager Joe Maddon said of Hendricks’ season. “Put the radar gun in your back pocket and look at what he’s doing. That has to be strong consideration, not just consideration. . It’s been very, very impressive.”

Andrew McCutchen’s one-out single in the seventh was the other hit off the right-hander. Hendricks is seeking to become the first Cubs pitcher to win the major league ERA title since Bill Lee in 1938.

Since Sept. 1, 2015, Hendricks is 18-7 with a 2.25 ERA.

Kuhl, in his ninth major league start, allowed three runs and four hits in five innings as the Pirates lost their second straight after winning four in a row.

Jordy Mercer doubled with two outs off Edwards in the eighth before pinch-hitter Matt Joyce flied deep to center to end Pittsburgh’s best threat.

Chapman hit 103 mph while striking out one in a perfect ninth.

TRAINER’S ROOM

Pirates: RHP Gerrit Cole (elbow inflammation) played catch, a day after being put on the 15-day disabled list. He could return as soon as Sept. 9. “Hopefully, (the rehab) will go quickly,” Cole said. . INF Jung Ho Kang (shoulder), working out with Indianapolis, is expected to begin an official rehab stint with the Triple-A team this week.

Cubs: RHP John Lackey (shoulder) will throw a bullpen session Thursday. If it goes well, he could start Sunday vs. San Francisco.

SUSPECT FIELD

A large chunk of the outfield in center and right fields was re-sodded and looks chewed up after Wrigley Field hosted Pearl Jam and Billy Joel concerts while the Cubs were away.

“It’s like a field after a concert,” RF Jason Heyward said.

UP NEXT

RHP Jason Hammel (13-7, 3.21) was moved up to start Wednesday night’s series finale against RHP Ryan Vogelsong (3-3, 3.02). LHP Mike Montgomery was pushed to Thursday. Hammel was lifted after allowing three runs in 2 1/3 innings Saturday. “He wants to get back out there,” manager Joe Maddon said.