SANTA CLARA—Less than a month ago, the San Francisco 49ers were in the Playoff hunt, now there in contention for the No .1 Seed in the NFC after a Sunday night win, 42-38 over the playoff bound Chicago Bears at Levi’s Stadium.

Chicago Bears Quarterback Caleb Williams, had a big game, drove the Bears downfield and had the Bears on the 2-yard line with four seconds to go.

The 49ers forced an incompletion on the final play to hang on to force a winner take all matchup with the Seattle Seahawks for the NFC West crown and home field advantage. San Francisco will host the Seattle Seahawks on Saturday night.

The 49ers gave up 38 points Sunday night and still won a wildly entertaining and crucial game against the Chicago Bears. Purdy accounted for five touchdowns, including a 38-yard score to Jauan Jennings with 2:15 remaining to give the 49ers the lead.

A highlight of the night for Purdy came in the third quarter, when he avoided the pass rush as he rolled left, split two defensive linemen to step up and tossed it to Kyle Juszczyk for the touchdown.

Purdy has been on fire the past few weeks and was fantastic. The 49ers didn’t have tight end George Kittle, who was out with injury, and they lost offensive tackle Trent Williams on the first play of the game with a hamstring injury.

It didn’t matter because Purdy and Christian McCaffrey, who had 181 total yards, were dominant.

With the win, the 49ers set up a huge home game for Week 18. Since Super Bowl LX will be in Santa Clara, a win means the 49ers will not play another road game this season.

The first half was one of the most eventful of the season. Purdy had a passing touchdown and a rushing touchdown by the end of the first quarter.

Williams had a 35-yard touchdown pass to Luther Burden III in the first quarter. It was the first NFL game this season in which both teams scored two touchdowns in the first quarter.

There were 49 points in the first half alone, in what many fans are calling it the game of the year.

The points kept coming in the second half. The game was tied 7-7, 14-14, 21-21, 28-28 and 35-35. It’s the first time in NFL history that has happened. Both offenses were putting on a great show.

Both defensive units left a lot to be desired, allowing a combined 80 points. That will have to improve if either team has any realistic shot of reaching Super Bowl XL.