Jared Goff threw for 351 yards, Darrell Henderson ran for a crucial 38-yard touchdown and the Los Angeles Rams moved into a tie for the NFC West lead with a 38-28 win over the Arizona Cardinals on Sunday.

The Rams (8-4) have won three of four and are tied with the Seahawks, who lost to the New York Giants 17-12.

Los Angeles had a 24-14 lead early in the fourth and looked like it was going to pull away until Nsimba Webster fumbled on a punt return. The Cardinals recovered at the LA 15-yard line and quickly turned the mistake into a touchdown on Kenyan Drake's 4-yard run that pulled Arizona within 24-21.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

The Rams responded on their next drive, moving quickly downfield. Henderson sliced through Arizona's defense untouched for the 38-yard score that pushed it to 31-21.

The Cardinals (6-6) have lost three straight and four of their past five. Second-year Arizona quarterback Kyler Murray had an inconsistent game, completing 21 of 39 passes for 173 yards and three touchdowns. He also lost a fumble midway through the fourth and threw a pick-6 to LA's Troy Hill, who ran it back 35 yards for a 38-21 lead.

Arizona opened the game with a 59-yard touchdown pass from Murray to tight end Dan Arnold, who didn't have a defensive player within 15 yards of him while making the catch. The Rams were distracted by triple-teamed DeAndre Hopkins, which led to Arnold being wide open, and he was able to jog into the end zone.

Los Angeles' defense, which has been among the NFL's best this season, tightened in a hurry. The Cardinals didn't get another first down until late in the second quarter, and Murray finished the first half 3-of-12 passing for 73 yards.

The Rams rallied for a 14-7 halftime lead. They tied it early in the second quarter on a 9-yard touchdown run by rookie Cam Akers and pulled away when Goff hit Tyler Higbee for a 1-yard touchdown with 51 seconds left before halftime.

Goff completed 37 of 47 passes for the day. The Rams also had a big advantage in time of possession, keeping the ball about 39 minutes to Arizona's 21.

CLICK HERE TO GET THE FOX NEWS APP

DESERT DOMINANCE

Los Angeles coach Sean McVay now has a 7-0 record against the Cardinals, and the Rams' offense is averaging nearly 35 points per game in those wins.

The Rams clinched their fourth straight non-losing season, which is the first time that's happened for the franchise since 1983-86.

INJURIES

Rams: Henderson (knee) left the game in the first quarter but returned to score his big touchdown.

Cardinals: CB Johnathan Joseph (stinger) left the game in the first half.

UP NEXT

The Rams host the New England Patriots on Thursday night.

The Cardinals travel to face the New York Giants next Sunday.