MIAMI GARDENS, Fla. -- Weird things happen in Brocktober.

The Miami Dolphins' season was on the brink of falling apart, and -- just their luck -- they needed their backup quarterback to save the day. Brock Osweiler responded with a career-high 380 passing yards in a crazy, back-and-forth 31-28 overtime victory over the Chicago Bears.

It was one of the most exciting games of the season, with dramatic turns for both teams. At several points Sunday, Miami looked down and out.

Chicago had the ball on Miami’s 1-yard line twice, including once midway through the fourth quarter with a chance to go ahead by two touchdowns, and the Dolphins forced a turnover on both occasions.

Miami’s red-zone defense stood on its head, as it has for much of the season. A T.J. McDonald interception and a Robert Quinn forced fumble kept the Dolphins alive.

NFL scores, standings and more Everything you need this week:

• 2018 playoffs coverage »

• Full schedule » | Full standings »

• 2019 draft order: Every first-round pick »

More NFL coverage »

“I’m not going to lie to you; mine was lucky. It hit my ankle. I know it hurt. But hey, I’d rather be lucky than unlucky,” Quinn said about knocking the ball free from Bears running back Jordan Howard. “Today it just worked our way.”

Osweiler, who had his own lucky play with a 35-yard completion to Kenny Stills that bounced off Danny Amendola to convert a third-and-11 in overtime, added: “Football gods were on our side today.”

The Bears (3-2) had a 93.2 percent chance to win the game at one point, per ESPN’s probability index.

Miami starting quarterback Ryan Tannehill was ruled out 90 minutes before game time with a shoulder injury, which threw a wrench in the Dolphins' plans. Betting odds moved to nearly a touchdown in the Bears' favor.

Dolphins players, including Osweiler, didn’t find out the switch from Tannehill to Osweiler until Sunday morning.

“Today felt like a heavyweight prize fight,” Osweiler said.

Added Dolphins running back Frank Gore, who had his first 100-yard game with Miami: “This showed how tough we are, how we believe in each other and the coaches. This is a tough, great Chicago team. We proved we can beat a great team.”

This team has a fight about them, even after losing two consecutive games and their starting quarterback. Khalil Mack was projected to feast on a banged up offensive line, but his name was barely mentioned Sunday. Tackles Laremy Tunsil, Ja’Wuan James and the rest of the Dolphins' offensive line played extremely well. Mack didn’t have a sack and finished with just two tackles.

It’s Brocktober, and weird things happen.

Weird, such as Kenyan Drake overcoming an overtime fumble on the goal line that dropped the Dolphins' win probability from 99.6 percent to 49.9 percent.

Albert Wilson had six receptions for 155 yards and two long catch-and-run touchdowns in the Dolphins' overtime victory over the Bears. AP Photo/Joel Auerbach

Drake was despondent on the sideline with a towel over his head, thinking he lost the game. Gore had led the Dolphins down the field, with powerful runs dragging Bears defenders. He seemed to be the obvious choice for the third-and-goal run, but he was admittedly gassed even after Miami called a timeout to rest him.

“I wasn’t ready to go. He was fresh. We’re both the starter. I trust him. I would do it again,” Gore said. “Our running back coach (Eric Studesville) told us to stay with it, keep pounding and something good will happen.”

Gore (101 yards) and Drake (57) did their work in 28 carries. They added 39 combined receiving yards.

Drake got a chance for redemption when the Bears' Cody Parkey missed a 53-yard field goal, and Drake played a key role in his team's game-winning drive.

Weird, such as Osweiler, a much-maligned backup QB, shaking off interceptions on back-to-back drives to lead several key scoring drives in the fourth quarter and overtime. It was Osweiler's second career game with three passing touchdowns and his first since 2015, when he was Peyton Manning's backup in Denver.

To be fair, Albert Wilson did most of the work.

Wilson had six catches for 155 yards and two touchdowns. He’s one of the NFL’s best yards-after-catch receivers, and it showed Sunday, most notably when he broke off a 75-yard touchdown, making six Bears defenders miss.

“I knew when I made the first cut I was taking it to the house,” Wilson said. “I was brought here to make plays.”

There was a lot of talk this summer about Wilson’s role in the Dolphins' offense. It seemed unclear with Kenny Stills, DeVante Parker and Danny Amendola emerging as starters. But coach Adam Gase had a plan for Wilson, and it has shown up big-time this season.

Wilson became the first player in the NFL with multiple 70-yard receiving touchdowns this season.

This Dolphins team keeps fighting. They’re 4-2, still atop the AFC East and showing that they can overcome a lot.

“That’s what these guys do; that’s why they’re here. I like this locker room; I like the way these guys keep fighting,” Gase said. “We like playing at home, I know that. We like it hot. The other team wears down eventually and we just keep fighting.”