SANTA CLARA, CA -- Blaine Gabbert had the stage to himself in San Francisco's quarterback competition with Colin Kaepernick nursing a sore shoulder and provided a strong finish to an uneven performance in the exhibition opener.
Gabbert overcame a shaky start to throw a 43-yard touchdown pass to Vance McDonald before the Houston Texans rallied in the second half against San Francisco's reserves to beat the 49ers 24-13 on Sunday.
"There were ups and downs," Gabbert said. "But we saw when we got into the groove what we can do as a unit."
Brock Osweiler didn't fare as well in his Texans debut, failing to lead Houston to any points in three drives. Houston got on the board early when John Simon returned a fumble by Carlos Hyde 41 yards for a touchdown but struggled to generate any offense with its starters.
"Was it completely what I wanted tonight? Absolutely not. But rarely is it ever," Osweiler said. "I think the biggest thing about tonight is we did some really good things offensively and we know we have some things that we need to work on and grow and get better at."
With Kaepernick sitting out with tightness in his throwing shoulder, Gabbert got to make his case in the battle to win San Francisco's starting quarterback job for first-year coach Chip Kelly.
Gabbert, who started the final eight games last season, did little to improve his position in the first two drives. He was off-target on his first two passes as San Francisco went three-and-out in 41 seconds on the opening drive and started the game 1 for 6 overall.
But he was much more effective on the third drive when he scrambled 13 yards for a first down and then hit McDonald for the long score when Benardrick McKinney slipped in coverage.
"The good thing is that he did settle down," Kelly said. "There were some real positives that we can build on but there were some throws that even if you ask Blaine, he'd say he wished he had those back."
Gabbert finished 4 for 10 for 63 yards and a touchdown.
Osweiler, who signed a $72 million, four-year contract with Houston in the offseason, went 4 for 7 for 27 yards. He took one sack and left for good after throwing an incomplete pass to Braxton Miller on fourth down early in the second quarter.
"To put on the Texan uniform, and run out of the tunnel as a team for the first time, it was certainly special," Osweiler said.
Tom Savage threw two TD passes in the second half for Houston, connecting on a 9-yarder to former California receiver Stephen Anderson and a 9-yarder to Akeem Hunt in the fourth quarter.
For more San Francisco 49ers coverage, click here.