BALTIMORE, MARYLAND - DECEMBER 01: Jimmy Garoppolo #10 of the San Francisco 49ers celebrates a touchdown with Mike Person #68 against the Baltimore Ravens at M&T Bank Stadium on December 01, 2019 in Baltimore, Maryland. (Photo by Rob Carr/Getty Images)

In the span of 48 hours the San Francisco 49ers went from best record in the NFL to fifth seed in the NFC. But all is not lost just yet in the Bay Area.

Two field goals are all that separate the San Francisco 49ers from a run at NFL immortality.

On Sunday in Baltimore, the 49ers lost to the AFC-leading Ravens 20-17 when Justin Tucker made a 49-yard field goal as time expired. Three weeks earlier it was Jason Myers of the Seahawks converting a 42-yarder with four seconds left in overtime to hand the 49ers their first loss of the season.

Lost in those two defeats is how close the 49ers are to being 12-0 instead of the 10-2 record they currently have. Rookie kicker Chase McLaughlin, filling in for an injured Robbie Gould against Seattle, missed a 47-yard field goal in overtime to win the game. And on a rainy day in Baltimore the vaunted 49ers defense held MVP front-runner Lamar Jackson to 105 yards passing and the Ravens offense to their fewest total yards (283) since Week 5.

By virtue of that Week 10 loss to Seattle, San Francisco went from having the best record in the NFL to being the fifth seed in the NFC and facing the possibility of having to go on the road in the playoffs. The Seahawks also improved to 10-2 by winning their fifth straight game against Minnesota 37-30 on Monday.

But the 49ers shouldn’t be counted out of the NFC West race yet.

While they have the fourth-toughest schedule over the final four weeks, they’re all games San Francisco will feel like they can win. First comes a matchup in New Orleans on Sunday against the 10-2 Saints and quarterback Drew Brees. San Francisco, though, is the first team to allow fewer than 1,700 yards passing through the first 12 games of a season since the 1989 Vikings. They’re giving up just 134 passing yards per game, nearly 30 fewer than any other team, and are perfectly suited to shutting down Brees and the Saints passing attack.

The 49ers will also get another chance to beat Seattle in the final week of the season, this time on the road at CenturyLink Field. Their first matchup, although a loss, showed they have plenty to be optimistic about. Gould is back in the lineup. So is Pro Bowl tight end George Kittle, who’s vital to the 49ers offense both catching the ball and blocking on run plays. Neither played in the first game four weeks ago.

The Seahawks also aren’t as dominant a team like the 49ers are. Each of their wins in their current five-game win streak has been by one score. They’re 9-1 this season in games decided by one possession. Seven of the 49ers 10 wins, meanwhile, have been by double-digits.

The 49ers defense has become arguably the best unit in football this season. They lead the NFL in fewest yards allowed and are second to the New England Patriots in points allowed. Nick Bosa and DeForest Buckner are wreaking havoc up front, second-year linebacker Fred Warner has been playing at a Pro Bowl-level, while Richard Sherman is locking down opposing receivers in the secondary.

On the offensive side of the ball, quarterback Jimmy Garoppolo hasn’t thrown an interception in his last two games and is completing 73 percent of his passes over his last three. Running back Raheem Mostert, who had been lost in the offensive scheme since Week 3, finally got some carries on Sunday in Baltimore and responded with a season-high 146 yards and a touchdown.

After the loss in Baltimore on Sunday, head coach Kyle Shanahan hinted at the high expectations the 49ers have this season.

“I was real proud of the team. I thought they played extremely hard, all three phases. Definitely played against a real good team,” he said in his post-game press conference. “But I was real happy with our guys and how they played. We had every chance to win that game…Hopefully, we can earn an opportunity to maybe get a chance to play them some other time again.”

The only other time they can play the Ravens is on the first Sunday in February in Miami. And, while they may have lost the division lead for the first time this season, they have every reason to believe that the road to the Super Bowl in the NFC will run through Silicon Valley.