But the Rams lost to their northern rivals 31-10 on Nov. 15 and 27-24 in the season finale on Jan. 9. And now, on the NFC's biggest stage, they must face a 49ers team that slipped into the playoffs with that Week 18 win -- a 49ers team the Rams have lost to six straight times.
Even worse for L.A., history suggests beating the same team three times in one season is not as hard as it sounds. The same teams have met a third time on 22 occasions, with the winner of the first two matchups taking the third 14 times.
So it is that the 49ers and Rams will meet each other for the NFC title (6:30 p.m. ET, Fox) for the second time in postseason history. The 49ers beat the Rams 30-3 in the 1989 NFC Championship Game.
"I don't think there's many secrets," Niners coach Kyle Shanahan said. "There are not many things we can surprise them with and same with them with us, which I think is kind of the most fun way. It'll be two really good teams and a really good football game where you can't really trick each other. You have to go out and beat somebody."
Four of the 49ers' victories during the current six-game streak have come as underdogs, a position San Francisco occupies again heading into Sunday.
Before their Week 18 game, Niners tight end George Kittle characterized the contest as "kind of a body-bag game" while attempting to explain how the winning team would have to exert its will on the opponent. Apparently, that became bulletin-board material for the Rams.
After L.A. jumped out to a 17-0 lead in the first half, Kittle said about five Rams players began "chirping" at him, to which he responded that there was "a lot of time up on that clock."
He was right. There was enough time for the Niners to rally and punch their ticket to the postseason, to which Kittle said, "Hopefully, I can see them again." Rams pass-rusher Von Miller got a chuckle out of it when told of Kittle's comments this week.
"That's the Joker," Miller said, laughing. "That's just the way he goes about it. We've got to do our part to make sure we've got body bags over here, too, I guess. They're a tough, physical team. That's just how they go about stuff. That's been working for them. We've got to do what we can do and play our brand of football and not really get caught up."
Another thing the Rams can't get caught up in? Crowd composition. In that Week 18 meeting, the stadium was a sea of red, so much so that quarterback Matthew Stafford said it was a "tough environment." The Rams' offense had to go to a silent snap count because of the crowd noise, and coach Sean McVay said the Rams were "caught off guard" by the Niners fans in attendance.
San Francisco receiver Deebo Samuel alleged after the game that the Rams "pump noise because there weren't that many Rams fans there."
Former Niners quarterback Alex Smith, who was at that game, said he thought it was about a 60/40 split in favor of San Francisco. For Smith, who grew up in California and has observed the heated rivalries between Major League Baseball's Giants and Dodgers and the NBA's Warriors and Lakers, it felt like a real rivalry had been reborn.
"I think this has turned into one of the coolest rivalries in football," Smith said. "It piggybacks off of Giants-Dodgers and it's the same fans. It's turned into this Northern California vs. Southern California [thing]. They don't like each other. Even going to the head coaches who are great friends and obviously have a bunch of history, I think that just adds to the entire storyline."
For Sunday's game, the Rams have attempted to restrict ticket sales to fans with credit card billing addresses in the surrounding Los Angeles area, though they denied it was related to what happened in the most recent meeting.
That came after Melissa Whitworth, the wife of Rams left tackle Andrew Whitworth, pleaded on Twitter with Rams fans not to sell their tickets to Niners fans and said she'd buy them instead. McVay playfully asked his fan base to "hold on to those tickets."
Those efforts, of course, could not account for what was already happening in the ticket market. According to Vivid Seats, this is the most in-demand game of the postseason with an average price of $824 and a get-in price of $537. Vivid Seats has a fan forecast -- a proprietary algorithm -- that earlier this week projected the crowd to be 65/35 in favor of the 49ers. However it ends up, the team is confident its fans will again turn up in mass on Sunday.
"When you can get your fans behind you like that on the road ... it just changes the momentum of the game," quarterback Jimmy Garoppolo said. "It's not something that you could really put your finger on and you can't see specifically, but you could feel, you could hear it. And our team responds well to that. So hopefully the faithful will be out there loud and proud. I know they're trying."
Of course, while ticket distribution and past meetings are fun to discuss, none of it will matter much. Depending on your allegiance, the Niners might have a mental edge because they've won six in a row, or the Rams might be poised to break through because they're too good to lose to the same team seven times in a row.
In the end, this game will come down to the usual things like turnovers, third downs and tackling.
"It's why we're in this position," McVay said. "Let's go roll it out and see who plays the best in that 3½-hour window and gives themselves the chance to advance."
ESPN NFL Nation reporter Brady Henderson contributed to this story.