BALTIMORE (AP) When the Los Angeles Rams look back on this important victory, they might recall how Matthew Stafford helped put the team in a quandary with three costly turnovers.

They most certainly won't forget how the gritty quarterback made amends by overseeing a near-flawless fourth-quarter comeback that produced in a 20-19 win Sunday over the short-handed but stubborn Baltimore Ravens.

Stafford threw a 7-yard touchdown pass to Odell Beckham Jr. with 57 seconds left immediately after completing a 5-yarder to Beckham on a fourth-and-5. Although Los Angeles (12-4) failed on a 2-point conversion, the Ravens - playing a third straight game without injured quarterback Lamar Jackson - never got close enough for a field-goal try.

The Rams' fifth straight victory pushed them to the cusp of their second straight NFC West title. Arizona needed to beat Dallas later Sunday to avoid elimination.

Facing a depleted defense that was coming off a humbling performance in Cincinnati one week earlier, Stafford was intercepted twice by Chuck Clark in the first half, the first pickoff returned 17 yards for Baltimore's only touchdown. The quarterback also lost a fumble while being sacked in the third quarter.

The Rams trailed 16-7 before Stafford directed a 55-yard drive that produced a 1-yard touchdown run by Sony Michel with 12:09 remaining. Baltimore responded with a field goal to make it 19-14 with 4:33 left.

That left Stafford with more than enough time to win it.

''I felt pretty good. Felt like I've been in that spot a lot of times in my career,'' he recalled. ''Felt confident.''

Stafford launched the game-winning 75-yard drive by completing a 15-yard pass to tight end Tyler Higbee and a 24-yarder to Cooper Kupp. He finished the march with a pair of sharp throws to Beckham, the last one in the front corner of the end zone.

''I thought he was at his best when his best was required,'' Rams coach Sean McVay said of Stafford. ''He's a mentally tough guy and that's what you want from your quarterback.

''When we had to have it, he made big throw after big throw in a clutch situation.'' McVay noted. ''That's what great players do.''

At one point this season, Baltimore was 8-3 and the top seed in the AFC. The Ravens (8-8) have since lost five straight, their longest skid since a nine-game run in 2007 under Brian Billick paved the way for current coach John Harbaugh to take over in 2008.

Four of those defeats during this slump have come by a total of five points.

''I think it just comes back to us finishing as a team in all phases,'' Clark said. ''It's just the small details and things like that.''

The loss ousted Baltimore from the AFC North title hunt. The Ravens were not officially eliminated from the playoff chase, but to get in as a wild card they'll need a win next week and a whole lot of help.

Baltimore gave the Rams everything they could handle, but in the end Stafford made the difference with his precise TD toss to Beckham.

''The throw was right where it needed to be,'' Harbaugh said.

''It was nice to go get the win that way,'' said Stafford.

Stafford completed 26 of 35 passes for 309 yards and two touchdowns.

Starting for Jackson, Tyler Huntley went 20 of 32 for 197 yards in his third NFL start. He missed last week while on the COVID-19 reserve list.

One week earlier, Cincinnati quarterback Joe Burrow pierced the Ravens depleted secondary for 525 yards and four touchdowns in a 41-21 blowout. Although Stafford rallied the Rams to a victory, he was severely tested by a defense that has struggled without injured cornerbacks Marcus Peters, Marlon Humphrey and Anthony Averett.

RECORD BREAKER

Andrews set a Ravens single-season record for yards receiving, breaking the mark set by Michael Jackson during the team's first year in Baltimore after relocating from Cleveland.

Andrews has 1,276 yards this season. eclipsing Jackson's 1,201 in 1996. Andrews also stands just four catches shy of matching the franchise single-season record of 103, set by Derrick Mason in 2007.

INJURIES

Ravens: C Bradley Bozeman dressed for the game, but ended up watching from the sideline while wearing a mask despite going the entire week without being listed on the injury report. Trystan Colon started in his place. Harbaugh said Bozeman became ill too late to be placed on the inactive list.

UP NEXT

Rams: Wrap up the regular season at home against the San Francisco 49ers, who whipped LA 31-10 on Nov. 15.

Ravens: The rival Pittsburgh Steelers come to town for the season finale.

---

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

Copyright 2024 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.