GLENDALE, Ariz. (AP) With Todd Gurley and Tavon Austin, the St. Louis Rams' offense might not be so bad after all.

The Rams entered Sunday's game at Arizona with an offense ranked dead last in the NFL. Gurley proceeded to rush for 144 yards in the second half alone and Austin caught six passes for 96 yards and two touchdowns to help the Rams hand the Cardinals their first loss of the season, 24-22.

Gurley, the first-round draft pick from Georgia, had just two yards rushing in the first half. Then, as Austin put it, ''he exploded.''

More from FoxSports

Gurley said the offense was tired of watching the defense play so well only to have the team lose because the Rams couldn't move the ball.

''We just got fed up and know what we are capable of doing,'' he said.

Arizona had scored touchdowns on 11-of-12 trips to the red zone in the first three games. Against the Rams (2-2), the Cardinals were 1 for 5.

''It's a very good defense,'' Carson Palmer said of the Rams. ''I think aside from our defense, it's one of the best, probably the best defense.''

Gurley's 52-yard run set up Nick Foles' 12-yard touchdown pass to Austin that put St. Louis up 24-15 with 8:49 to go.

The Cardinals finally got a touchdown when Palmer lofted a 19-yard pass to David Johnson to cut it to 24-22 with 4:38 to go.

Arizona (3-1) got the ball back and drove to the St. Louis 42, but on third-and-2, Palmer overthrew receivers on consecutive plays and Gurley rambled for more yards before sliding to the turf so more time could elapse on the clock.

St. Louis improved to 2-0 against NFC West teams. The Rams beat Seattle in the season opener.

Here are some things that were learned in the Rams' victory.

GURLEY'S A BEAST: The No. 10 overall pick in the draft, Gurley was sidelined with a knee injury the first two games of the season. When he made his debut last week in a loss at Pittsburgh, he managed nine yards on six carries.

In the first half against Arizona, he had two yards in four attempts. In the second half, he carried 15 times for 144 yards.

''We were focused, finishing runs from the offense to the defense and I was able to get into the rhythm where I kept getting carries,'' Gurley said.

FOLES AT THE CONTROLS: Nick Foles, still getting comfortable with the offense after his trade from Philadelphia, had two touchdown passes in his first three games.

He had three against Arizona.

The former University of Arizona star completed 16 of 24 for 171 yards with no interceptions.

JOHNSON'S DAY: Arizona rookie David Johnson discovered how quickly one's NFL fortunes can turn.

Two weeks earlier, he returned the opening kickoff 108 yards for a touchdown against Chicago. On Sunday, he fumbled the opening kickoff and the Rams recovered, setting up their first TD.

''I think it was just the ball in the wrong hand, a kindergarten thing,'' Johnson said.

Moments later, Johnson broke wide open on third-and-goal and dropped Palmer's pass, leading to the first of five field goals.

Johnson went on to catch four passes for 63 yards, including a 19-yarder in the fourth quarter, the Cardinals' lone TD.

PALMER'S LOSS: Palmer's streak of nine consecutive victories ended.

He said the team may have learned a lesson.

''I think that sometimes these things are a blessing in disguise, just because I think this team will respond exactly as it's supposed to,'' Palmer said.

TOUGH SCHEDULE

Things don't get any easier for the Rams, who play at Green Bay next Sunday before getting a couple at home.

Arizona plays its next two, and six of its next eight, on the road.

Next week the Cardinals are at Detroit. They will stay in West Virginia after that to prepare for the game at Pittsburgh the following week.

---

AP NFL website: www.pro32.ap.org and www.twitter.com/AP-NFL