Four hours before the Vikings' Thanksgiving night game against the Patriots, Kevin O'Connell walked into the home locker room at U.S. Bank Stadium and was stunned at how many players were already in the building.

The team had absorbed its worst loss ever in Minneapolis four days earlier; the Thursday night game presented the Vikings an opportunity to quickly expunge that 37-point defeat against the Cowboys. If they felt that game was out of character, the 33-26 victory they produced against the Patriots — sweating it out the whole way — was a return to the form that has them on the precipice of an NFC North title.

"It just kind of shows how excited guys were to get out here and show that energy, that excitement, that brotherhood we have in this locker room," wide receiver Adam Thielen said. "I think that's what helped us prevail."

After Kirk Cousins found Thielen for a go-ahead touchdown with 9:40 left, the Vikings' pass rush conjured its biggest plays of the night, stopping the Patriots' final two drives with sacks from Danielle Hunter and Khyiris Tonga.

The victory improved the Vikings' record to 9-2, giving them a chance to clinch the NFC North at home with a win against the Jets next Sunday and losses from the Packers and Lions.

Cousins, who overcame a first-half interception, completed 30 of 37 passes for 299 yards and three touchdowns. The one to Thielen came on a play the Vikings had tried calling several times; Cousins had checked out of the play when the Patriots didn't present the defense they wanted.

The quarterback got to the line of scrimmage before his headset shut off; he could hear O'Connell saying, "We got the look [we wanted]." The Patriots played with Devin McCourty as their only deep safety, following Justin Jefferson across the field; Thielen crossed to the opposite side, hauling in a touchdown pass in the back left corner of the end zone behind Jalen Mills.

"I was stubborn [with that call]," O'Connell said with a smile. "I was going to continue to find the look we were looking for, and like great coaching staffs do, they were able to vary some things up. Our whole group was ready — clean pocket. I think Kirk had three or four hitches right there. Even though it's a play pass, you still have to block the man over you, and block the edges. I thought that was one of the cleanest pockets all night. We figured we would have one of those guys; Kirk made a great decision and an unbelievable throw in that moment."

The Patriots deferred after winning the opening coin toss, giving the Vikings the ball first. And for the seventh time in 11 games this season, the Vikings scored on their opening drive.

After Jefferson had called for quicker passes on Monday to help mitigate pressure on Cousins, the Vikings opened with a series of short throws, including a quick 7-yard completion on their third play for Jefferson's first catch of the game. The drive ended with Cousins hit Jefferson on a crossing route for a touchdown, putting the Vikings up 7-0.

The Patriots, who didn't score an offensive touchdown last week, came back with a quick TD drive engineered by big plays.

Jakobi Meyers' diving catch gave New England a 24-yard gain on its first play, and with the Patriots on the Vikings' 34, Nelson Agholor ran a go route from the slot. Chandon Sullivan passed Agholor off to the Vikings' safeties, and Agholor streaked downfield into a seam between Harrison Smith and Cam Bynum, catching Mac Jones' pass for a 34-yard touchdown.

Two Vikings possessions later, Cousins threw over the middle for K.J. Osborn with New England tackle Daniel Ekuale diving at the quarterback's ankles 3.25 seconds after the snap. Cousins' pass sailed over Osborn's head, and Jonathan Jones intercepted it to set up a Patriots field goal.

Cousins stood at a podium smiling after the game as he talked about the Vikings' ninth victory of the season. It will not keep him, he said, from a critical look back at the throws he missed.

"This is the way I am, man," he said. "I go back there and think about all the plays I need to be better. I probably drive my family crazy being this way, but it's just the way I'm wired. I'm kind of obsessed with improvement, so even when things are good, my mind goes to, 'How can they be better?' "

But Cousins will also review throws to Jefferson he fit in between Patriots double teams, like the 37-yarder where Jefferson's slick over-the-shoulder catch set up a touchdown to T.J. Hockenson.

The score put the Vikings up 16-13 late in the first half after kicker Greg Joseph missed his fifth extra point of the season.

Patriots quarterback Mac Jones, who finished with a career-high 382 yards, drove the Patriots into field-goal range before halftime with completions of 22, 16, 14 and 13 yards.

The Patriots continued throwing to start the second half. Jones, with plenty of time to sit in the pocket, found receivers in space over the middle of the field. On a

second-and-10 from the Vikings 37, he threw over the middle for tight end Hunter Henry off play action. Henry eluded Bynum's diving tackle attempt and stormed into the end zone to make it 23-16 Patriots.

The Vikings' response came in the form of one of several special teams plays that changed the game.

Kene Nwangwu caught the ensuing kickoff at the Vikings 3, picked up a block down the left sideline and broke into the open. His 97-yard return, the third kick return TD of his career, tied the score at 23.

Jones went after Duke Shelley on the Patriots' next drive as he had done for much of the night, hitting DeVante Parker for 41 yards to put the Patriots in position for another touchdown. But after officials ruled Henry scored on a 6-yard pass from Jones, a review found he'd lost the ball as he went to the ground. The Patriots settled for a field goal that made it 26-23.

"I thought we would either be looking a fourth-and-inches, or it was incomplete," O'Connell said. "It's one of those things that could have gone a lot of different ways, but I was very happy it went the way it did."

The Vikings tied the score after Cousins led another drive for a field goal. The defense forced just its second three-and-out of the night (after a Harrison Smith pressure on one of the Vikings' first blitzes of the game) and a penalty gave the Vikings new life on what turned out to be a go-ahead drive.

Patriots running back Pierre Strong's helmet hit Ryan Wright's foot as he followed through with his second punt of the night, and officials called Strong for running into the kicker, giving the Vikings a first down.

Cousins hit Jefferson for 36 yards against double coverage two plays later. Then came the touchdown on the play O'Connell and Cousins had been waiting for all night.

"Kirk did a good job of reading it out, and just firing it in there," Thielen said. "It was pretty close to getting tipped, but I'm glad we completed it."

And the Vikings, as they have so many times this season, managed to keep their season from veering off course.