Tim Heitman-USA TODAY Sports

The San Francisco 49ers looked like they were going to win going away against the Dallas Cowboys at AT&T Stadium in Sunday’s NFL Wild Card Game.

San Francisco held a 23-7 lead heading into the fourth quarter and were dominating on both sides of the ball.

That’s when the bad Jimmy Garoppolo showed up, throwing an ugly interception with the 49ers up 23-10. Like clockwork, Dak Prescott drove Dallas down the field to pull the game within six points.

Even then, the 49ers seemingly won the game on a third-down run by Deebo Samuel that was ruled a first down on the field. Following review, the officials called Samuel roughly an inch short.

49ers head coach Kyle Shanahan lined up to go for it before a false start penalty was called on left tackle Trent Williams. He ultimately opted to punt with the Cowboys taking over at their own 20 with 32 seconds remaining.

After Prescott led the Cowboys to 28 yards on three plays, the quarterback ran up the middle all the way down to the 49ers’ 24-yard line with 14 seconds remaining. It did not give Dallas time to run a final play, ending the game in the process with the San Francisco 49ers coming out on top in thrilling fashion, 23-17.

This is just the latest epic game in a rivalry that dominated NFL’s landscape in the 1980s and for three consecutive seasons in the 1990s. It also has San Francisco set to head to Lambeau Field to take on Aaron Rodgers and the Green Bay Packers in the NFC Divisional Playoffs.

As for the Cowboys, their season comes to an end in ugly fashion. That included a franchise playoff record 14 penalties. Meanwhile, rumors will continue to swirl as it relates to head coach Mike McCarthy’s future.

NFL world reacts to thrilling San Francisco 49ers win over the Dallas Cowboys

More must-reads:

TODAY'S BEST
Pacers' Pascal Siakam leads team to Game 6 win vs. Knicks
Watch: Matt Duchene's 2OT winner sends Stars to conference final
Scottie Scheffler shoots improbable 66 after warming up for PGA Championship in a jail cell
Report: Tua Tagovailoa away from Dolphins amid contract chatter
Nuggets star has worrying comment about latest injury
Paul Skenes makes incredible Wrigley Field history in second-career MLB start
Giants rookie CF to undergo season-ending labrum surgery
Yankees' Juan Soto reacts to Hal Steinbrenner contract talk
Late goal sends Panthers to Eastern Conference Finals
Ex-teammate of Shohei Ohtani placed bets with same illegal bookmaker as interpreter 
Former Rams first-round pick retires from NFL after 11 seasons
Insider provides major injury update on Celtics' Kristaps Porzingis
Watch: Bruins strike first in Game 6 with incredible backhand goal
Dodgers make series of moves involving notable players
Hurricanes not expected to re-sign defenseman, center
Maple Leafs tab former Stanley Cup winner as new head coach
NFL insider expands on competition between Steelers QBs Russell Wilson, Justin Fields
NFL sets outrageous prices for Eagles-Packers Brazil game
Broncos 'very unlikely' to bring back former NFL interceptions leader
Greg Olsen offers broadcasting advice to Tom Brady