The winner-take-all Game 5 of the National League Division Series stayed neck-and-neck from the start, neither team scoring until the sixth inning, and then just tallying a single run each.
The Dodgers (106 wins in the regular season) drew first blood off a double by Corey Seager in the sixth that sent Mookie Betts home after he had just stolen second.
The 107-win Giants quickly evened things up with a solo home run from Darin Ruf off a 94 mph fastball from Julio Urias.
Urias, normally a starter, wasn't sent to the mound until the third, as Dave Roberts opened with Corey Knebel and Brusdar Graterol for a single inning each before sending in Urias.
WATCH: Fans celebrate at Dodger Stadium after win over Giants
The score stayed 1-1 through the ninth inning.
Cody Bellinger opened up a 2-1 lead in the ninth when he snuck a single through a gap in the infield to send Justin Turner home and advance Gavin Lux to third. But with two men on base, the Dodgers couldn't further capitalize, carrying the thinnest of leads into crunch time.
Max Scherzer, the Dodgers' starting pitcher in Monday's Game 3 loss in Los Angeles, was sent in on short rest to seal the win in the ninth inning. He finished on a controversial strike that some analysts thought was a check swing.
The Dodgers now face the Braves in Atlanta on Saturday for Game 1 of the National League Championship Series.
After Thursday's game, manager Dave Roberts said he was prepared to use Scherzer again on just two days rest to open the NLCS.
Mayors of Los Angeles, San Francisco exchange friendly trash-talk over Dodgers-Giants series
The game had all kinds of historical implications.
The two teams have been rivals since the 1890s, when both played in New York. But they hadn't met in a playoff series before this.
Dodgers broadcasting legend Vin Scully called it "the most important game in the history of their rivalry."
To my knowledge, tonight's game between the @Dodgers and @SFGiants is the most important game in the history of their rivalry. With nearly identical records, and so much at stake, I believe this to be the case.— Vin Scully (@TheVinScully) October 14, 2021
And according to ESPN, it was only the fifth time in baseball history that two teams with 100 or more wins met in the postseason for a winner-take-all game.
These teams also share a star-studded history of meeting in deciding games to see who advances.
In the decisive Game 3 of a 1951 NL pennant tiebreaker, Bobby Thomson hit what many consider the most famous home run ever when he connected for the "Shot Heard 'Round the World," a three-run drive in the bottom of the ninth that lifted the New York Giants over Jackie Robinson and the Brooklyn Dodgers 5-4 at the Polo Grounds.
The franchises had shifted to the West Coast when they played a best-of-three matchup for the 1962 NL pennant. After topping Los Angeles ace Sandy Koufax in the opener, San Francisco lost the next day. Mays then keyed a four-run rally in the ninth inning to win 6-4 in Game 3 at Dodger Stadium.
"I think our players understand the magnitude of the Game 5 in a DS at home against the Dodgers with the magnitude of a postseason series, all the dramatics that have happened in Game 5s along the way and some of the cool things that have happened for the Giants players and Giants fans," Giants manager Gabe Kapler said Wednesday.
"Our players are well aware of that so when I hear them talk about it it fires me up a bit. Their understanding and knowledge of the history, it's encouraging," he said.
And all these years later, the longtime rivals are still at it.
"This is what baseball wants. I mean, I think, as I understand, all the series are done and so we're going to be the only show in town," Los Angeles manager Dave Roberts said. "So if you have a pulse or you're a sports fan, you better be watching Dodgers-Giants."
The Associated Press contributed to this report.