HOUSTON -- - Houston Texans coach Lovie Smith wanted Davis Mills to come out of the halftime locker room and play one more series, with the hope that the second-year quarterback would have some success and end his preseason on a high note.
"We just wanted to come out and put together a good drive and put up some points," Mills said. "And that's what we did."
Mills was 6 for 10 for 58 yards with an interception. He played the entire first half and the first drive of the second half, finishing off his night with a 16-yard touchdown pass to Moore.
San Francisco starting quarterback Trey Lance was 7 for 11 for 49 yards on three scoreless drives. Two of the drives ended in punts and one ended on downs. Lance was scrambling from the Houston pass rush on many of his plays and was sacked once.
"Some ups and downs, for sure," Lance said. "It never feels real good to lose, but I will learn from it and turn the page. I'm not going to make a bigger deal out of it than we need to. It was definitely not our best night, but like I said, we're not going to make too big a deal out of it."
"It was pretty rough, we didn't play clean at all," 49ers coach Kyle Shanahan said. "I think we struggled to stop the run on that first drive, which is tough. When we did play good defense, I thought we had a couple bad penalties that kept them on the field.
"Offensively, just way too many penalties. But it was also defense and special teams. I just thought we struggled to execute. It was sloppy play, and I wish it would have been clean."
Houston took a 7-0 lead when rookie fourth-round pick running back Dameon Pierce scored on a 1-yard run that capped off a lengthy drive on the Texans' first possession. Pierce is listed behind veteran running backs Marlon Mack and Rex Burkhead on the depth chart but he started Thursday night.
"Dameon Pierce has been that way every time we've given him the ball," Smith said. "He's a very good football player."
Mack had 10 rushes for 55 yards, and Burkhead had 10 carries for 28 yards.
Smith didn't go as far as to say Pierce would be the Week 1 starter, just saying that the team will announce starters soon.
Houston rookie safety Jalen Pitre, a second-round pick, had five tackles, including one for a loss.
Texans kicker Matt Ammendola made a 45-yard field goal in the third quarter to put Houston up 17-0. Ammendola later missed from 31 yards. Veteran kicker Ka'imi Fairbairn was sidelined with an injury so the Texans signed Ammendola for the preseason finale.
"We have a long ways to go still, but when you keep score, of course, you want to score points as often as you can," Smith said. "And defensively, whenever you can get a shutout, that's big."
Undrafted rookie linebacker Segun Olubi led San Francisco with nine tackles.
Two San Francisco second-string linebackers suffered injuries in the first half. Oren Burks suffered a knee injury and Curtis Robinson suffered an ankle injury. Defensive tackle Akeem Spence was evaluated for a concussion. Texans defensive tackle Roy Lopez was sidelined with a "soft tissue injury," Smith said and is expected to play Week 1.
Texans first-round draft picks cornerback Derek Stingley Jr., taken third overall, and left guard Kenyon Green, the 15th pick, both played in the game, with Stingley starting and Green taking reps with the second team.
The Texans observed a pregame moment of silence and video tribute for former team president Jamey Rootes. He died this week "after a battle with mental health issues," his wife said in a Facebook post. Rootes served as team president from the inaugural season in 2002 until February 2021.
49ers: At Chicago on Sept. 11.
Texans: Host Indianapolis on Sept. 11.