GLENDALE, Ariz. — C.J. Beathard lined up in the shotgun with 7 seconds left, hoping to get one more completion to set up a potential tying field goal.
He and the 49ers never got the chance.
The snap sailed over Beathard’s head and San Francisco’s chances went with it, punctuating a disheartening 18-15 loss to the Arizona Cardinals on Sunday.
“Guys are really hurting in there and they should be,” 49ers coach Kyle Shanahan said. “If they’re not, something’s wrong with them. But it’s our job, it’s what we do. We’re not happy at all with where the season’s gone. We need to step it up and we’re going to do something about it.”
Arizona won the NFC West rivals’ first meeting on Oct. 7 by forcing five turnovers.
The Cardinals (2-6) completed the season sweep behind rookie quarterback Josh Rosen’s late-game poise.
Rosen spent the first three quarters frustrated by San Francisco’s near-constant pressure. He was sacked three times, including once for a safety in the first quarter, and often had to throw before he could go through his progressions with hands and bodies all around.
Once the fourth quarter started, the 49ers couldn’t get the same kind of pressure, and Rosen flourished with the extra time.
He led Arizona on a pair of scoring drives in the quarter, hitting Larry Fitzgerald on a 13-yard touchdown pass early, then finding Christian Kirk on a 9-yard score with 34 seconds left.
Rosen came into the huddle to start Arizona’s final drive with a few choice words.
“We’re going to win this (expletive) game,” he said.
The Cardinals did just that.
“That was a lot of fun,” Rosen said. “That’s why sports are fun.”
The Cardinals, winners at home for the first time under first-year coach Steve Wilks, beat San Francisco for the eighth straight time and second time in three weeks.
San Francisco (1-7) has lost six straight, including three games by three points or fewer.
“We didn’t expect to start this way, obviously,” said Beathard, who threw for 190 yards and a touchdown on 14-of-28 passing. “But we have and this is where we’re at right now, and we’ve got to move forward.”
The 49ers put themselves in good position to end the losing streak by dominating Arizona on defense and doing just enough on offense through three quarters.
“Our defense gave us a very good chance to win, giving us three turnovers and getting us a 12-point lead,” Shanahan said. “We didn’t capitalize on them enough for touchdowns and we didn’t make the plays at the end when we needed to.”
The Cardinals labored against San Francisco’s defense in their first game under new offensive coordinator Byron Leftwich, held to 135 yards and one field goal by Phil Dawson.
The 49ers had their own offensive problems in the first half, leading 5-3 despite gaining 61 total yards.
San Francisco finally revved up its offense in the second half, going up 15-3 after Beathard threw a 55-yard touchdown pass to Marquise Goodwin and Robbie Gould kicked his second field goal, from 20 yards.
Nothing worked in the fourth quarter.