The Los Angeles Rams and San Francisco 49ers got together Thursday night and delivered one of the most exciting games of 2017, with the Rams coming out on top in a 41-39 thriller. Todd Gurley scored three total touchdowns and Jared Goff threw for three (one to Gurley) as the Rams improved to 2-1 on the year.

The Rams got off to a fast start by picking off Brian Hoyer on the first play of the game, setting up Gurley’s first touchdown of the night. The 49ers came back and tied it up on their next drive, finally scoring their first touchdown of the season. After that, we had a fun little back-and-forth, though San Francisco never really recovered from that early mistake as the Rams took a 24-13 lead into halftime, thanks to three first-half scores by Gurley.

LA continued asserting itself in the second half, with Goff methodically picking apart the Niners’ defense and opening up a 14-point lead at the end of the third quarter. Sammy Watkins kept up a 15-point lead with his second touchdown, but the 49ers refused to go away.

Things got incredibly tense late in the fourth quarter. After Hoyer hit Trent Taylor to make it 41-33 Rams, the 49ers recovered a fumble on the ensuing kickoff. Carlos Hyde punched in a 1-yard touchdown run to make it 41-39, but the two-point conversion failed. With just two minutes left, the 49ers recovered their onside kick for a shot to win the game, but the drive stalled after an offensive pass interference penalty.

Four things we learned

1. Hey, a good Thursday night game!

How many people rolled their eyes when they saw Rams-49ers on the TNF schedule? Sounds like a stinker, right? Well, this game blew away expectations in the best way possible. It’s not only the best Thursday night game in recent memory, it’ll likely go down as one of the best games of the 2017 season.

This was everything we hope for from an NFL game — fun, competitive, and well-played with a handful of dazzling highlights, like Pierre Garcon’s toe-dragging catch or Watkins channeling Willie Mays on a basket catch. It all built up to a wild finish that came down to a two-point conversion, which ultimately failed and gave the Rams the win.

If we had this kind of game every week, Thursday Night Football probably wouldn’t be the punchline is currently is.

2. Jared Goff is finally in a position to succeed

It’s funny how much of a difference having a real coaching staff can make. After looking utterly lost under Jeff Fisher last season, Goff suddenly looks and plays like a legitimate NFL quarterback with Sean McVay calling the plays. There are still a lot of flaws to his game, but this is the first time we’ve seen him live up to his pedigree as a No. 1 overall draft pick.

Goff was nearly flawless on Thursday night, completing 22 of 28 passes for 292 yards, three touchdowns, and no interceptions. This is the closest he’s looked to being a franchise quarterback, and there are plenty of reasons to think he’ll only get better under McVay. The Rams’ long-term fortunes are drastically changed with Goff turning it around.

3. Todd Gurley isn’t finished yet

Gurley scored just six touchdowns last season in a massive sophomore slump. He’s already matched that total this year, with six touchdowns in three games. Gurley finished with 28 carries for 113 yards and five catches for 36 yards, chewing up clock and keeping the chains moving when it mattered most. His three-score outburst single-handedly swung the game in the Rams’ favor and helped them hold off a surging 49ers team down the stretch.

4. Brian Hoyer showed signs of life, but not enough

After a horrid performance against the Seattle Seahawks (99 passing yards on 27 attempts), Hoyer was ... slightly better here. He was more assertive in leading scoring drives, even corking a couple of deep balls that hit their mark. He played by far his best football of the year late, rallying the 49ers back from a 34-20 deficit to make it a game late.

Unfortunately, Hoyer reverted back to form on the 49ers’ last drive, misfiring on multiple passes and taking a deer-in-headlights sack to end the game. It was the ultimate Brian Hoyer Experience, for better or worse.

His final stat line (23-of-37 passing, 332 yards two touchdowns, one interception) is respectable enough, but Hoyer still had enough of those classic miscues that remind you why he’s never stuck with one team for long. He’s probably not in danger of losing his job soon, but at 0-3, the 49ers are already on the brink of another pointless season.