Mets starting pitcher Nolan McLean throws against the Cubs during...

Mets starting pitcher Nolan McLean throws against the Cubs during the first inning on Thursday in Chicago. Credit: AP/Nam Y. Huh

CHICAGO — When Nolan McLean was called up in mid-August, manager Carlos Mendoza cautioned that you couldn’t ask a rookie to float in and save the season. But late-September baseball has a way of defying preset rules, and on Thursday night, McLean was given the ball and essentially asked to do just that.

Statistically, it was his worst start of the season, and still, he managed it. But Mendoza was right in one respect — he didn’t do it alone.

McLean dominated before faltering in the sixth, Brett Baty hit a key three-run homer and the bullpen came up big as the Mets defeated the Cubs, 8-5, in the rubber game of the series.

Francisco Lindor hit his 30th home run and Tyrone Taylor added a two-run double in the sixth. Ryne Stanek, Brooks Raley, Tyler Rogers and Edwin Diaz shut down the Cubs for 3 2⁄3 innings, allowing only two baserunners.

“You want to stay alive,” Lindor said. “We’re in a position right now where we control our own destiny and we’ve got to take care of business ... Nobody really cares what we’re going through. It’s part of it, so we have to get it done.”

The Reds are one game behind the Mets with three more to play (Cincinnati owns the tiebreaker). Arizona is two games behind the Mets and also has the tiebreaker against them.

The Mets will conclude their regular season against the Marlins; the Reds have a heftier opponent in the Brewers, though with that team having clinched everything there is to clinch, they could rest some of their starters. Arizona will face the Padres.

Until a rocky sixth inning, McLean was often untouchable and almost always confounding. He struck out the side, all swinging, in the second. In fact, all but one of his career-high 11 strikeouts came on swinging strike threes — aided by a sharp cutter, a sweeper with nearly two feet of horizontal break and a whirling curveball that bottomed out on hitters. The Cubs swung at eight curveballs and swung through seven of them.

McLean was victimized by the home run ball, though, allowing two solo shots and a three-run homer by Seiya Suzuki. It was Suzuki’s second homer of the night and it knocked out the righty in the sixth.

McLean allowed five runs and five hits with two walks in 5 1⁄3 innings. It was the first time in eight major-league starts that he allowed more than two earned runs.

“He was really good today,” Mendoza said. “The way he used all of his pitches — I thought the cutter today was the best we’ve seen. You feel good about your chances every time he takes the baseball.”

The Mets kicked off the scoring in the first, aided by one of baseball’s lesser-known rules. Lindor led off with a walk and moved to third on Pete Alonso’s one-out double. Mark Vientos then hit a high pop-up that veered well into foul territory, and Dansby Swanson caught it while falling into the stands. Swanson threw home and got Lindor in plenty of time ... if the ball had been live.

The rulebook, though, states that runners are awarded a base when a ball is caught by a defender outside the field of play — meaning that Lindor’s run counted. Brandon Nimmo’s single drove in Alonso to put the Mets ahead 2-0.

With one out in the third, Lindor pulled Shota Imanaga’s inside fastball 408 feet to left, crushing it out of Wrigley Field.

With Juan Soto and Alonso, this marks the first time in franchise history that the Mets have had three players hit at least 30 home runs. With his 31 stolen bases, this is Lindor’s second 30-30 season. He and Howard Johnson are the only two players to put together two such seasons for the Mets.

The Mets made it 6-0 in the fourth when, with Nimmo and Luis Torrens on base, Baty blasted a 91.3-mph fastball 371 feet the opposite way for a three-run shot, his career-high 18th homer. It was his third homer against a lefthander this season and a testament to the trust Mendoza now has in him against lefty pitchers.

“I think [I’m just] hanging in there,” Baty said. “I’m not trying to do too much with them ... If you come to the ballpark the same guy every single day and work really hard, the game is going to give back.”

McLean didn’t allow a run until the fourth, on Suzuki’s solo homer to left-center. He allowed another solo shot in the fifth, this one by Swanson, who hit a hanging first-pitch sinker to right to draw the Cubs within 6-2.

Taylor’s two-run double in the sixth, though, gave the Mets more of a cushion and forced Imanaga out of the game.

McLean walked Ian Happ with one out in the sixth and allowed a double by Moises Ballesteros before Suzuki hit an inside sweeper out of the ballpark to make it 8-5.

That ended McLean’s night. It wasn’t perfect, but it ended up being enough.

“We feel good,” Baty said. “We feel like we’ve just got to go down there [to Miami] and handle business.

“We’re going to try to get a W and see where things are and then keep fighting until the end.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME