The Los Angeles Dodgers managed to slip through a crack on Thursday, advancing to the National League Championship Series on a gift following a broken-bat comebacker.

Kim Hye-seong scored from third base on an 11th-inning error by Philadelphia Phillies pitcher Orion Kerkering and the Dodgers advanced to the NLCS for the seventh time in the past 10 seasons with a 2-1 victory over the Phillies in Game 4 of the NL Division Series on Thursday.

"An instant classic game," Dodgers manager Dave Roberts said.

The Dodgers will open the NLCS on Monday either on the road against the Milwaukee Brewers or at home vs. the Chicago Cubs. That series is tied 2-2 and is headed for a decisive fifth game after Ian Happ hit a three-run homer and the Cubs rolled to a 6-0 Game 4 victory over the visiting Brewers.

Los Angeles starter Tyler Glasnow struck out eight over six scoreless innings, and reliever Roki Sasaki threw three perfect frames. Mookie Betts drew a game-tying, bases-loaded walk in the seventh inning.

"Oh my gosh, you're talking about one of the great all-time appearances out of the bullpen that I can remember," Roberts said of Sasaki, a rookie from Japan who struggled as a starter then missed more than four months with a shoulder injury.

"Certainly given where he started this year, to go out there and not only go one inning, two innings and then three innings, and to do what he did gave us a huge boost."

Tommy Edman singled for Los Angeles with one out in the 11th inning against Jesus Luzardo, and Kim entered as a pinch runner. Max Muncy singled with two outs to put runners on the corners, and Enrique Hernandez walked against Kerkering to load the bases.

Andy Pages hit a comebacker that Kerkering bobbled. Instead of throwing to first base to end the inning, Kerkering tossed the ball past catcher J.T. Realmuto to set off a Dodgers celebration on the infield.

"That's a tough way to go out," Edman said of Kerkering and the Phillies. "You feel for the guy, but that's what pressure does to you."

Kerkering referenced the pressure-packed moment as well.

"Just hit off my foot," Kerkering said. "Just kind of, once the pressure got to me, I just thought there's a faster throw to J.T, little quicker throw than trying to cross-body it to Bryce (Harper at first base). So just a horse s--- throw."

Philadelphia starter Cristopher Sanchez was charged with one run over 6⅓ innings. Jhoan Duran, Matt Strahm and Luzardo (0-2) got the Phillies into the 11th before their season ended on their second error of the game.

"Deep down my heart, I felt that this was a team that was gonna do it and overcome (a 2-0 series deficit)," Philadelphia's Kyle Schwarber said. "But it's a really good team across the way, too, and you have to tip your cap. They held us at bay for eight innings, and we just couldn't push through there at the end."

When Glasnow exited, the Dodgers turned to Emmet Sheehan in the seventh inning, and the Phillies pounced.

Realmuto led off with a single but was forced out at second base on a Max Kepler ground ball. The Dodgers, however, failed to complete the double play when Sheehan misplayed the throw from Betts at first base. Sheehan's error put Kepler at second base.

Castellanos followed with a go-ahead double just inside the third base bag and into the left field corner for a 1-0 lead.

The Dodgers threatened immediately against Sanchez in the bottom of the inning when Alex Call walked and Hernandez singled with one out. Duran came on to get Pages on a groundout, advancing the runners, before Shohei Ohtani was intentionally walked to load the bases.

Los Angeles tied it 1-1 on Betts' walk.

After Sasaki retired all nine batters he faced, Alex Vesia (1-0) pitched a scoreless 11th for the Dodgers.

In Chicago, Kyle Tucker and Michael Busch also homered as the Cubs won their second straight game in the best-of-five series. The clubs will play the deciding Game 5 on Saturday night in Milwaukee.

Nico Hoerner had three hits and a run, Matt Shaw added two hits and an RBI and Tucker had two hits and two runs for the Cubs.

Matt Boyd struck out six in 4⅔ innings as five Chicago pitchers combined on a three-hitter. Boyd gave up two hits and walked three.