CHICAGO (AP)The Detroit Lions looked as if they were on their way to another loss trailing by 14 points in the fourth quarter.

They sure turned it around in a hurry.

Jamaal Williams scored on a 1-yard run in the closing minutes, Jared Goff threw for 236 yards and a touchdown, and Detroit overcame another dazzling effort by Chicago’s Justin Fields to beat the Bears 31-30 on Sunday.

Jeff Okudah returned an interception for a touchdown, and the Lions (3-6) scored 21 points in the fourth to rally for their second straight win after losing five in a row.

”It’s one thing to believe you can do it, and then it’s another thing to do it and finish a game like that,” Goff said.

The Lions (3-6) hung on to beat Green Bay last week when Aaron Rodgers threw an incompletion on fourth down at the Detroit 17 in the final minute.

And they turned things around in a flash in the fourth against Chicago (3-7), wiping out a 24-10 deficit and going on a long scoring drive in the closing minutes to come away with another tight win.

”You want to learn to win in close games, you win in close games,” coach Dan Campbell said. ”That’s two now. Once you’ve been in there and you start to figure out what you’ve got to do and the focus and the intensity and the detail and the hustle and everything that it takes to finish out a game, it’s highly important.”

LIONS RALLY

The Lions tied it with two touchdowns in a span of just over a minute early in the fourth – a 9-yard run by D’Andre Swift and Okudah’s 20-yard interception return.

Fields then went 67 yards untouched for a TD to put Chicago back on top 30-24. Cairo Santos missed the extra point.

Goff led an eight-play, 91-yard drive in the closing minutes. Tom Kennedy turned a pass on third-and-8 at the Detroit 42 into a 44-yard gain to the 14.

A 13-yard pass to Amon-Ra St. Brown put the ball on the 1. Williams scored on the next play to give the Lions a 31-30 lead with 2:21 remaining.

The defense then stopped Chicago, with Julian Okwara sacking Fields after he broke several tackles, and the Lions picked up back-to-back wins for the first time since October 2020 under former coach Matt Patricia. They also stopped a 13-game road winless streak.

FIELDS SHINES

Fields ran for 147 yards and two scores, after going for 178 the previous week against Miami – the highest rushing total by an NFL quarterback in a regular-season game since at least 1940. He became the only quarterback in the Super Bowl era with multiple rushing touchdowns of 60-plus yards in the same season, and both came in the past two games. He scrambled 61 yards for a score in the loss to the Dolphins.

Fields also threw for 167 yards and two TDs, including a 50-yarder to Cole Kmet against Detroit. But the Bears lost for the sixth time in seven games despite scoring 29 or more for the fourth straight week.

”Just finish,” Fields said. ”We’re putting up about 30 points a game. So just finish and we’ll get those late-game drives.”

Goff completed 19 of 26 passes.

St. Brown had 119 yards receiving. Brock Wright caught a touchdown, and the Lions won on the road for the first time since beating the Bears at Soldier Field in December 2020.

”I think when you have a team like that that has an unwavering belief in the things that are being preached from top to bottom, I think you’ll get good results,” Okudah said. ”Sometimes it’s a lagging process, but hard work is undefeated.”

Chicago’s Khalil Herbert returned a kickoff 50 yards. He also ran for 57.

The Bears finished with 258 yards rushing, making them the first team in the Super Bowl era with at least 225 in five straight games. But they were hurt by nine penalties.

”They’ve got to have their eyes forward,” coach Matt Eberflus said. ”They’ve got to look at their performance for what it is and then move forward to the next game, and they’ve done that. It will eventually crack.”

3K TD FOR LIONS

Okudah’s TD was the 3,000th in franchise history. The Lions have 3,001 – 1,560 passing, 1,147 rushing and 294 on defense and special teams.

BALANCED SCORING

The Lions had touchdowns passing and rushing and on an interception return. They had not done that since Nov. 18, 1973 at Chicago.

INJURIES

Lions: S DeShon Elliott (concussion protocol) left after he was hurt trying to tackle Fields as he crossed the goal line on his touchdown run at the end of the first half. … LB Julian Okwara (knee) and DL Josh Paschal (knee) were hurt in the first half.

Bears: Fields needed two stitches for a cut behind his right ear. … Kmet appeared to be shaken up in the closing minutes and walked off the field. Eberflus said he had no update on him.

UP NEXT

Lions: Visit New York Giants next Sunday.

Bears: Visit Atlanta next Sunday.

AP NFL coverage: https://apnews.com/hub/nfl and https://twitter.com/AP-NFL