CHICAGO (AP) — Andrew Knizner slid across home plate, hopped up and pumped his right arm in jubilation.

Make it a very sweet 16 for the St. Louis Cardinals.

Knizner scored the go-ahead run on Codi Heuer's wild pitch in the ninth inning, and the Cardinals beat the lowly Chicago Cubs 4-2 on Sunday for their 16th straight victory.

“We did the little things,” manager Mike Shildt said, “the little things that help you win games.”

The Cardinals' franchise-record streak is the longest in the majors since Cleveland took 22 in a row in 2017, and the best in the National League since the New York Giants won 16 straight in 1951 on their way to an improbable pennant.

Paul Goldschmidt and Harrison Bader homered to extend a streak that has rocketed the Cardinals into position for the second NL wild card, leading Philadelphia and Cincinnati by six games with six to go.

Next up is a three-game series against NL Central champion Milwaukee beginning on Tuesday night in St. Louis.

“We're really locked in,” Knizner said. “We're playing good baseball. We're playing all the way through the ninth inning until the last pitch.”

Knizner drew a leadoff walk in the ninth. With one out and the bases loaded, Heuer threw a pitch to Tyler O'Neill that tailed away from catcher Willson Contreras, bringing Knizner home.

Heuer then mishandled O'Neill's comebacker and Lars Nootbaar scampered to the plate, giving the Cardinals a 4-2 lead.

Chicago dropped its sixth straight game. The fourth-place Cubs (67-89) went 39-42 at Wrigley Field this year.

Heuer (7-4), who was acquired in the July 30 trade that sent Craig Kimbrel to the crosstown White Sox, has allowed at least one run in each of his last three appearances.

“This is the first time we've seen him just not be as sharp as he was when he first got here,” manager David Ross said. “Don't have any real reason or anything to put my finger on right now.”

Bader's 15th homer of the season tied it at 2 with two outs in the eighth. The Cardinals connected for a franchise-record 13 homers in the four-game series.

Génesis Cabrera (4-5) got two outs for the win, and Giovanny Gallegos worked the ninth for his 14th save in a wild finish.

With one out and runners on first and second, third baseman Nolan Arenado slipped while trying to catch Frank Schwindel’s popup. But Arenado threw to shortstop Paul DeJong covering third, and DeJong threw to second for what the Cardinals thought was a game-ending double play.

But Schwindel was called out for the infield fly rule, and there is no forceout on the play. Rafael Ortega rounded second and was tagged by second baseman Tommy Edman, but the umpires ruled the play was already dead.

“It's just a matter of timing. Timing wasn't on our side,” said Shildt, who was ejected after he came on the field to argue the play. “Clearly took exception with it. They were OK with that, for the most part.”

A request was made for an explanation from the umpiring crew, but a spokesman for the Cubs said it was declined.

After order was restored, Gallegos struck out Ian Happ swinging for the final out.

“He did a nice job coming back and closing that game out,” Knizner said.

The Cardinals joined the 1887 Philadelphia Quakers as the only teams in major league history to win their final 11 or more road games in a season, according to the Elias Sports Bureau.

St. Louis jumped in front on another Goldschmidt drive, a massive solo shot to center off Keegan Thompson with one out in the third. The 31st homer for the six-time All-Star traveled an estimated 464 feet.

Goldschmidt is batting .500 (12 for 24) with five homers and 10 RBIs in his last six games.

The Cubs responded with two in the fourth against Jake Woodford. Sergio Alcántara drove in Contreras with a ground-rule double down the left-field line, and David Bote followed with a sacrifice fly.

Woodford allowed six hits and walked two, continuing a solid stretch. The right-hander is 1-0 with a 1.90 ERA in five appearances in September.

TRAINER'S ROOM

Cardinals: SS Edmundo Sosa (right hand/wrist) was held out for the third straight game. He was hit by a pitch in the opener of Friday's doubleheader sweep. “Day to day, but he's healing and better today than yesterday,” Shildt said.

Cubs: INF Nico Hoerner (general soreness) missed his second straight game. With an off day on Monday, Ross said it made sense to give him another day. ... 3B Patrick Wisdom was out of the starting lineup because of right wrist soreness, stemming from a check swing during Saturday's 8-5 loss. ... Ross said OF Jason Heyward (concussion) will travel with the team to Pittsburgh for its series against the Pirates.

UP NEXT

Cardinals: Following an off day, RHP Adam Wainwright (16-7, 3.05 ERA) starts the series opener against Milwaukee. RHP Brandon Woodruff (9-10, 2.52 ERA) takes the mound for the Brewers.

Cubs: RHP Alec Mills (6-7, 4.83 ERA) starts Tuesday night in the opener of a three-game series at Pittsburgh. RHP Mitch Keller (5-11, 5.96 ERA) gets the ball for the Pirates.

___

Jay Cohen can be reached at https://twitter.com/jcohenap

___

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports