LOS ANGELES (AP) — The Los Angeles Rams were still reeling from the mass shooting less than five miles from their training complex when wildfires consumed the nearby hills, forcing a canceled practice and the evacuation of many players and coaches from their homes.

At the close of a horrific week in Thousand Oaks, a comeback victory over the Seattle Seahawks somehow seemed both more trivial and even sweeter to these resilient Rams.

Brandin Cooks rushed for a 9-yard touchdown with 5:49 to play on the first snap after Dante Fowler forced and recovered a fumble by Russell Wilson, and the Rams bounced back from their first loss of the season with a 36-31 victory Sunday.

Jared Goff was forced from his home during the week, but he passed for 318 yards and two touchdowns as the Rams (9-1) swept the season series with their division rivals.

"It's just been a tough week for the whole city, the whole area up there," Goff said of the Rams' weekday hometown, one hour northwest of downtown Los Angeles. "Hoping today provided a little bit of joy and regularity for those people."

Todd Gurley rushed for 120 yards and a score as Los Angeles moved into commanding position for its second consecutive NFC West title, but only after plenty of late drama in a rivalry that's never lacking in excitement.

Gerald Everett and Tyler Higbee caught TD passes for the Rams, who survived a topsy-turvy game with just enough big plays. Although the perfect season ended last week in New Orleans, Los Angeles still has never lost back-to-back games under coach Sean McVay.

"It means a lot, (because) there's a lot of tragedy that's been going on," said Aaron Donald, who had 2½ sacks of Wilson after evacuating his family during the week. "We've all been affected by it. We had to move ourselves, so to win a game like this, a divisional game, we're trying to give people something to smile about."

Fowler, the pass-rush specialist acquired from Jacksonville late last month, made up for his costly unsportsmanlike conduct penalty in the third quarter by stripping Wilson of the ball and then recovering the fumble, setting up Cooks' run for a 12-point lead.

Wilson threw three touchdown passes, rushed for 92 yards and nearly rallied the Seahawks (4-5) all the way back after his fumble.

Wilson hit Mike Davis for a short TD catch to cap a 90-yard drive with 1:56 to play. After the Seattle defense held, he got the Seahawks to the Los Angeles 35 before throwing four straight incompletions in the final minute.

"I think the whole stadium was nervous on that last drive, (but) it didn't work out," Wilson said.

Wilson also threw TD passes to Nick Vannett and Tyler Lockett , but the Seahawks have lost two straight after winning four of five.

Seattle took the lead with Lockett's TD catch in the third quarter, but only because their drive was kept alive by an unsportsmanlike conduct penalty against Fowler after a third-down stop.

"I knew I had to go out there and redeem myself," Fowler said.

RUNAWAY LOSS

Rashaad Penny rushed for 108 yards and a touchdown in the injury absence of Chris Carson for the Seahawks., who had 273 yards rushing at the Coliseum after racking up 190 yards on the ground in their 33-31 loss to the Rams last month in Seattle. "On this day, we went nose to nose," Seattle coach Pete Carroll said. "That's a statement to guys running the football. That's the whole thing fitting together."

GURLEY'S GAINS

Gurley scored his NFL-leading 17th touchdown in the second quarter on a 17-yard run. He also scored a TD in his franchise-record 13th consecutive game, extending his franchise record. He is the fourth player in league history to score a TD in each of his team's first 10 games.

SACK MACHINE

Donald has a career-high 12½ sacks already this season. He teamed up with Ndamukong Suh for a huge third-down sack at the Los Angeles 15 in the fourth quarter, forcing Seattle to kick a field goal.

BIG GIFT

Rams left tackle Andrew Whitworth is donating his game check to the Ventura County Community Foundation's Conejo Valley Victims Fund, which was set up to help the families of the 12 people killed Wednesday night by a gunman in Thousand Oaks, the home of the Rams' training complex. The Rams held a moment of silence before the game.

INJURIES

Seahawks: Carson sat out with a hip injury, while starting right guard D.J. Fluker missed the game with a calf injury.

Rams: Receiver Cooper Kupp went down in the fourth quarter holding his left knee, which sidelined him earlier this season. McVay said the injury "doesn't look good right now."

UP NEXT

Seahawks: A short week to host the Green Bay Packers on Thursday.

Rams: One of the biggest games of the regular season against the Kansas City Chiefs in Mexico City on Monday, Nov. 19.

More From 1460 ESPN