The ball sailed through the uprights and the party began. Fireworks exploded high above Mall of America Field. Fans cheered. Vikings players and coaches streamed onto the field to celebrate Blair Walsh's game-winning field goal in overtime.

Wait a second. What's that on the field?

"You look out there and see that little yellow flag," veteran defensive tackle Kevin Williams said.

Facemask penalty on Rhett Ellison. Hold the fireworks.

Wide receiver Greg Jennings was halfway up the tunnel when he heard someone yell for him to return to the field.

"Oh my gosh," Jennings said.

Imagine safety Jamarca Sanford's reaction. Heck, he was actually inside the Vikings locker room when a stadium worker informed him of the penalty.

"I walked back down there because I was exhausted from running and celebrating," he said.

He should have known better. These are the 2013 Vikings, after all. This team invents new ways to make a dreary season interesting, dramatic and, on Sunday, downright goofy.

The Vikings stepped to the edge of the cliff on more than occasion, but they somehow managed to escape another plunge that would have defined their circus season.

Given a second chance, Walsh connected on a 34-yard field goal with 1:43 left in overtime to secure a 23-20 victory against the Bears and allow the Vikings to celebrate a second time.

Owner Zygi Wilf sprinted onto the field, pumping both fists, the emotion of the moment overriding the reality of his team's 3-8-1 record.

"Just a wild football game that I'm so glad that we came out on top," coach Leslie Frazier said.

Sunday marked the first time the Vikings have played back-to-back overtime games since 1995. The Vikings left Lambeau Field with a 26-26 tie against the Packers last week. Linebacker Audie Cole admitted that "nightmare" possibility flashed through his mind again on Sunday.

"I was sitting there thinking, 'I don't think there's ever been two ties in a row,' " he said. "I was like, 'No way can that happen again.' "

Anything seemed possible after Ellison's facemask penalty on Chicago's Chris Conte nullified Walsh's 39-yard field goal with 8:04 left in overtime. Ellison said he was so worried about Devin Hester's speed rush off the edge that he reached without looking to disrupt Conte on the inside and grabbed his facemask.

His reaction when he saw the flag?

"That I really screwed over the team," Ellison said.

The penalty moved the Vikings back to the 36-yard line, and then Adrian Peterson lost 3 yards on a third-down run. Walsh's 57-yard attempt hit the crossbar.

The Bears (6-6) moved into scoring range on five Matt Forte runs. But Chicago coach Marc Trestman elected to try a 47-yard field goal on second down. Robbie Gould's kick sailed just wide right.

The Vikings capitalized on the new life, behind Peterson's relentless running. On a day in which he reached the 10,000-yard milestone, Peterson gained 30 of his 211 rushing yards on the final drive. Walsh brought the roller-coaster ride to an end with his 34-yard winner.

Nobody in the stadium felt more relieved that Ellison, who had a gaffe earlier in the fourth quarter when he bobbled a pass that resulted in an interception at the goal line.

"An elephant off my back," Ellison said. "A miracle, I guess. The defense, I feel like I should take them all out somewhere or something. I owe them big time."

The second half and overtime didn't lack for memorable moments and plays. Vikings cornerback Chris Cook was ejected after making contact with an official in the third quarter after giving up his second long touchdown catch to Alshon Jeffery.

Jeffery, who caught 12 passes for 249 yards and two touchdowns, gave the Bears a 20-10 lead entering the fourth quarter.

Matt Cassel played admirably in relief of Christian Ponder, who suffered a concussion late in the second quarter. Cassel completed 20 of 33 passes for 243 yards and one touchdown with one interception.

The interception deserves an asterisk. Trailing 20-17 late in the fourth quarter, Cassel hit Ellison on a slant at the Bears 1-yard line. The ball bounced off him and was deflected by a Bears defender before linebacker Khaseem Greene intercepted it and returned to the 50.

The defense forced a three-and-out, and the Vikings took over at their own 9-yard line with 2:40 left. But Cassel completed six of 10 passes for 82 yards, including a fourth-and-11 completion to Jerome Simpson for 20 yards.

That set up Walsh's 30-yard field goal with 20 seconds left to force overtime. Then came a premature celebration, followed by one that counted.

"You have got to believe, you can't tuck your tail and run, you can't give up. No matter how it looks you have to continue to fight," Peterson said. "That's one thing that we have done all year. Our record doesn't show it, but you guys have heard me say it time and time again: I haven't seen guys quit. When I look in their eyes there is fight there. Today was a perfect example of that fight that we have inside of us.''

Chip Scoggins • chip.scoggins@startribune.com