ST. LOUIS — Kyle Hendricks was so good Monday night he even surprised himself.

The right-hander took a no-hitter into the ninth inning before giving up Jeremy Hazelbaker’s leadoff home run, and the Chicago Cubs beat the St. Louis Cardinals 4-1 to close in on the NL Central crown.

“I never thought I’d get that close to one,” Hendricks said. “A guy who throws to contact and doesn’t throw hard, you don’t think about it. You can run into one of those special days and you think, why not?

“My pregame bullpen was probably the worst I’ve had all year. Hopefully it clicks once the game starts, and it did.”

All the way until the ninth inning.

Hazelbaker drove an 0-2 pitch into the right-field stands for his 12th homer before Hendricks (15-7), the major league ERA leader at 2.03, was relieved by Aroldis Chapman.

“If you’re going to give it up, at least it’s that way and not a cheap hit,” Hendricks said. “I just left the ball up and he got it. It was just a changeup and I wanted to throw it in the dirt and get him to chase.”

Hazelbaker was looking for a changeup.

“I wasn’t surprised by it,” he said. “He’d been throwing that pitch all night. It was a good pitch he threw me. I was able to handle it like I wanted to.”

Ben Zobrist and Dexter Fowler homered for the Cubs, who lowered their magic number to three for clinching the division crown. They lead the second-place Cardinals by 17 games and can wrap up the NL Central with a three-game sweep in St. Louis.

The Cardinals remained a half-game behind the Mets for the league’s second wild card. New York lost 8-1 at Washington.

Soon after Hazelbaker’s shot cleared the fence, teammates went to the mound to talk to Hendricks — leading to an animated argument between Cubs manager Joe Maddon and plate umpire Joe West.

Maddon was ejected for the third time this season, and Chapman entered to finish the one-hitter. He got three outs for his 14th save with Chicago, and is 34 for 37 overall this year with the Cubs and Yankees.

After the pitching change, Maddon argued some more with West before leaving.

“It was a misinterpretation there,” Maddon said. “We needed more time there. I needed the catcher to go to the mound. We were denied. I made my stand.

“I truly believe I was proper in that, but this is not about that. This is Kyle’s night.”

Hendricks, who threw 96 pitches, struck out seven and walked two.

“Pretty special night all around,” he said. “It was fun, man.”

It was the fourth no-hit bid broken up in the ninth inning this season. Cubs teammate Jake Arrieta tossed the lone no-hitter in the majors this year, winning 16-0 at Cincinnati on April 21.

Hendricks got some help from his defense, especially in the sixth.

Cubs shortstop Addison Russell, deep in the hole, went to his knees on the outfield grass for a sliding stop of Jhonny Peralta’s sharp grounder and made a strong throw to first.

Right fielder Jason Heyward then reached into the stands to catch Hazelbaker’s foul fly, practically wrestling with a fan in a Cardinals jersey for the ball.

“He was unbelievably great,” Maddon said about Hendricks. “Unfortunately, he didn’t get the no-hitter. They didn’t have good swings against him all night. He was in charge the entire game. It was a spectacular performance. Kyle was the star.”

Hendricks’ control made him tough to hit, Cardinals manager Mike Matheny said.

“He was pushing the corners all day long and he’s been doing that most of the season and didn’t give us a whole lot,” Matheny said.

Mike Leake (9-10) pitched six innings before being lifted for a pinch hitter. Leake, making his second start since a stint on the disabled list due to shingles, allowed six hits and four runs (three earned).

Anthony Rizzo had an RBI single for the Cubs.

The last time the Cubs won a division title was 2008. They did it by beating St. Louis on Sept. 20 at Wrigley Field.

TRAINER’S ROOM

Cardinals: RHP Michael Wacha (right shoulder) threw batting practice to Brayan Pena, Jose Martinez and Alberto Rosario. Wacha said he hopes to come off the disabled list Wednesday. … LF Matt Holliday took batting practice on the field for the first time since breaking his right thumb Aug. 11 against the Cubs. … Cardinals closer Seung Hwan Oh, who has 17 saves and a 1.87 ERA, was unavailable Saturday and Sunday against Milwaukee because of a sore groin. Speaking through translator Eugene Koo, the reliever said he would not be available Monday but should be Tuesday.

UP NEXT

Cardinals: LHP Jaime Garcia (10-12, 4.58 ERA) makes his 29th start of the season Tuesday night, his most since 2011 when he made 32. He has started seven games against the Cubs and is 3-2 with a 2.27 ERA.

Cubs: RHP Jason Hammel (14-8, 3.50) allowed nine runs — eight earned — and a career-high 13 hits over 5 2/3 innings in a 12-5 loss at Milwaukee last time out. He is 4-4 with a 4.80 ERA in 10 starts against the Cardinals.