LOS ANGELES (AP) – Matthew Stafford shook off three turnovers to guide a fourth-quarter rally Sunday that carried the Los Angeles Rams to their fifth straight victory, 20-19 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. After Los Angeles 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.

READ MORE: LA County Confirms More Than 28,000 COVID Deaths; Reports Highest Number of Daily New Deaths Since April 2021

The victory pushed the Rams (12-4) to the cusp of their second straight NFC West title. Arizona needed to beat Dallas later Sunday to avoid elimination.

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.

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.

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.

READ MORE: Talk Radio Icon, Los Angeles Legend Michael Jackson Dies At 87

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. He 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.

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.

Down 10-0 late in the second quarter, the Rams used a 34-yard interception return by Jordan Fuller and an 18-yard touchdown reception by Kupp to close to 10-7 before Justin Tucker kicked a field goal for Baltimore just before halftime.

MORE NEWS: 'We're Paying The Price As Consumers,' Union Pacific Rep Says Of Increased Train Robberies In LA

(© Copyright 2022 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)