HOUSTON — After years of struggles at the position, the San Francisco 49ers may have finally found their quarterback of the future in Jimmy Garoppolo.

But even after leading the team to its second straight win, 26-16, over the Houston Texans on Sunday, the former backup to Tom Brady wasn't convinced the job is his to keep.

"We'll see what happens this week. That's on (coach) Kyle (Shanahan)," he said when asked about starting next week. "I don't know."

It's pretty safe to say that Garoppolo will be under centre for the rest of the season after throwing for a career-high 334 yards and a touchdown as the 49ers (3-10) won their second straight game.

Garoppolo was 20 of 33 in his second start for a team that hasn't had consistent play at quarterback since Colin Kaepernick's great 2013 season. Acquired before the trade deadline from New England, Garoppolo threw for 293 yards in his debut with the team last week to help the 49ers to a 15-14 win at Chicago.

"You've got to have guys who are fearless, can hang in there and keep their eyes down the field. He does that very, very well," Shanahan said. "But he also has the foot quickness and agility to get out of there and extend some plays."

The game was tied when he found Garrett Celek on a 6-yard touchdown pass with about two minutes left in the third quarter to make it 23-16. Celek had a big play earlier in that drive on a 61-yard reception on third down.

"We knew it was kind of feast or famine against this defence because they're very physical," Shanahan said. "But sometimes, you get your opportunities, and we were fortunate enough to come down with them."

DeAndre Hopkins had 149 yards receiving and two touchdowns, but lost a fumble in the fourth quarter with the Texans down by 7 . San Francisco added 41-yard field goal after that to secure the victory.

T.J. Yates threw for 175 yards and two touchdowns after Tom Savage left with a concussion in the second quarter. Texans (4-9) lost their third straight and sixth in seven games.

Savage was injured when he was driven to the ground on a hit by Elvis Dumervil with about nine minutes left in the second. Replays showed Savage looking dazed after his head hit the ground with both of his arms lifted upward shaking.

He was taken to the medical tent, where he stayed for less than three minutes before returning to the bench and going back in for the next series. He threw two incompletions on that drive, and Houston's team doctor approached him after he returned to the sideline after that possession.

Savage tried repeatedly to enter the game on the next series. But a team official kept grabbing Savage's jersey and finally his arm and pulled him away from the field. He then could be seen arguing with that person and the team's trainer before being escorted to the locker room.

Coach Bill O'Brien said he was evaluated for a concussion after the hit and cleared to return, but that he was evaluated again after he returned because "because of what they saw," without providing details of what that was.

"They try to make the best decision for the player," O'Brien said. "Whatever they see and the testing that they do they try to make the best decision with the player and they weren't satisfied with the results of the second test so they decided to pull him, and that's when he went into the locker room."

Yates, who hadn't appeared in a game since Nov. 16, 2015, was signed last month after Deshaun Watson went out with a knee injury. Houston went up 16-13 when Hopkins grabbed a 29-yard touchdown reception on the Texans' first drive of the second half.

The 49ers took a 10-3 lead when Carlos Hyde ran 2 yards for a touchdown with about 2 1/2 minutes left in the first half.

Yates connected with Hopkins for a 7-yard touchdown on Houston's next drive, but the kick failed to leave Houston down 10-9.

Robbie Gould added a 35-yard field goal at the end of the second quarter to leave San Francisco up 13-9.

INJURIES: Houston offensive tackle Kendall Lamm sustained a concussion in the first quarter. The Texans have had six players sustain concussions in the last two games combined. ... 49ers rookie receiver Victor Bolden injured his ankle in the second quarter and didn't return. ... San Francisco cornerback Ahkello Witherspoon injured his knee in the fourth quarter.

MEMORIES: Sunday was Shanahan's first visit to NRG Stadium since losing to the Patriots in the Super Bowl when he was the offensive co-ordinator for the Falcons. He said he didn't think about that game, where the Falcons blew a 25-point lead, until he got to the stadium on Sunday.

"We got off the bus and were walking across the field, and that's when I remembered," he said. "I got some feelings of that. I had some real good feelings in that game, but not toward the end. The feelings today were definitely much better at the end."

UP NEXT

49ERS: Host the Titans next Sunday.

TEXANS: Visit Jaguars next Sunday.

___

For more NFL coverage: http://www.pro32.ap.org and http://www.twitter.com/AP_NFL