CHICAGO — Paul Goldschmidt and Harrison Bader homered and the St. Louis Cardinals outlasted the Chicago Cubs 4-2 on Sunday, posting their 16th consecutive victory.

The streak is the longest in franchise history and has turned the National League wild-card race into a non-story in September. Though the Cardinals haven’t clinched the No. 2 spot just yet, they are comfortably ahead of the field and are eyeing a wild-card matchup against either the Los Angeles Dodgers or San Francisco Giants next week.

The streak is also 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.

Jake Woodford allowed six hits and two earned runs in 5.1 innings of work, leaving room for four relievers to close out the game. Genesis Cabrera (4-5) picked up the win in less than an inning, registering two outs and a walk.

“I was just trying to go out there and do my job,” Woodford said. “During this streak, it’s been a good representation of trying to play as clean a baseball game as we can.”

The Cardinals entered the bottom of the eighth inning tied at 2-2 with the Cubs when their magic kicked back in. Andrew Knizner scored the go-ahead run on a wild pitch, and Lars Nootbaar crossed the plate with an insurance run on a groundout.

“We’re just playing Cardinal baseball right now,” Knizner told Bally Sports after the game. “And that’s playing all the way through nine innings.”

Woodford concurred.

“We never feel like we’re out of it,” he said.

Indeed, there was late-inning drama in their favor at Wrigley Field for the second time in as many days. On Saturday, the Cardinals posted a come-from-behind 8-5 victory.

Throughout the streak, power has been a major storyline and Sunday was no different. Goldschmidt’s homer sailed 464 feet, the seventh of his career of more than 460 and his second this season in that category, according to ESPN Stats & Information research.

“The way we’ve been playing is, over these last 16 games, we’ve been battling, from the first pitch to the last pitch,” Knizner said. “As long as we’re playing in the game, we feel that we’re in it.”

The Cardinals have hit 31 home runs during this streak. The only other team to hit that many homers over a span of 16 games, all wins, was those 2017 Indians.

St. Louis, which has Monday off, closed the weekend with a six-game lead over the Philadelphia Phillies and Cincinnati Reds for the second berth in the National League wild card. The Cardinals will send out Adam Wainwright (16-7, 3.05 ERA) to start a series vs. the Milwaukee Brewers on Tuesday.

“That’s why we play, is to win, and play in October. And everyone in this clubhouse feels like we can do that,” Woodford said. “But there’s work to be done.”

The Associated Press contributed to this report.