GLENDALE, Ariz. — Trey Lance did something Sunday he never did as a college starter: He lost.

The rookie quarterback made his starting debut and couldn't prevent the 49ers from dropping their third straight game, a 17-10 defeat to the Cardinals (5-0), who remained the NFL's only unbeaten team. The 49ers dropped to 2-3.

Head coach Kyle Shanahan created a conservative game plan centered around Lance's legs. The third overall pick who went 17-0 at North Dakota State, Lance had 89 yards on 16 carries. He completed 15 of 29 passes for 192 yards and threw an interception, posting a 58.4 passer rating.

Lance was the biggest story before kickoff, but the best performance belonged to the 49ers' defense. The 49ers didn't score in the first 43 minutes, but they stayed in contact against a team that arrived averaging an NFL-best 35 points a game with a quarterback, Kyler Murray, who led the league in completion percentage and ranked fourth in passer rating.

Leading 10-0 at halftime, the Cardinals' first four drives of the second half included 13 plays and ended with three punts and a lost fumble.

WDAY logo
listen live
watch live
Newsletter signup for email alerts

The 49ers made it 10-7 late in the third quarter on a six-play, 59-yard drive that ended with runs of 7, 12, 1 and 13 yards. It was capped by wide receiver Deebo Samuel, who lined up behind Lance and swept left on a pitch, received a path-clearing block from tackle Trent Williams and stiff-armed safety Jalen Thompson to the ground en route to the end zone.

However, the Cardinals' slumbering attack finally awoke to effectively put the game away with about five minutes left, after the 49ers' fourth failed fourth-down attempt of the game. Arizona's 52-yard drive ended with Murray twice targeting All-Pro wide receiver DeAndre Hopkins. He flung a 30-yard completion to Hopkins and followed with a 9-yard strike to him in the left corner of the end zone to give the Cardinals a 17-7 lead.

Lance didn't throw his only interception at North Dakota State until his 17th and final start. On Sunday, he tossed his first career pick on his second pass as a starter. On 2nd-and-10 from Arizona's 45-yard line, Lance escaped the pocket and had two excellent options: a wide-open running lane and a wide-open receiver, Travis Benjamin, who was settled between a group of defenders. Lance targeted Benjamin with an on-the-run throw, but it sailed high and was intercepted by safety Budda Baker.

The turnover set up the only touchdown of the first half. The Cardinals' eight-play, 66-yard drive was highlighted by a 26-yard run by wide receiver Rondale Moore on a lateral pass that set up a 1-yard scoring run by running back James Conner.

The 49ers' next two drives ended with Shanahan eschewing field-goal attempts on fourth-and-short situations, calling QB runs on each snap.

First, on 4th-and-2 from Arizona's 34-yard line, Lance was stopped for a 1-yard gain on a QB draw. The 49ers' next drive was a 13-play, 93-yard possession that lasted 9 minutes and 32 seconds, but resulted in no points. On 4th-and-goal from the 1, Lance ran a sweep to his right, and it appeared he would barrel into the corner of the end zone. However, he was stopped for no gain because of a hellacious three-defender collision that included linebacker Isaiah Simmons, who remained on the ground and was later cleared after he was evaluated for a concussion.

The 49ers went for 1-for-5 on fourth down. Their last failed attempt came midway through the fourth quarter after cornerback Dontae Johnson had forced a fumble, their first takeaway since Week 1, that gave them possession at their 46-yard line trailing 10-7.However, the offense couldn't take advantage. Three plays later, on 3rd-and-4, Lance's short pass over the middle to Brandon Aiyuk sailed high. On fourth down, Lance's pass was batted away by defensive end J.J. Watt.

Eric Branch — Email: ebranch@sfchronicle.com Twitter: @Eric_Branch — covers the 49ers for The San Francisco Chronicle — www.sfchronicle.com — which is distributed by Tribune Content Agency, LLC.