DENVER (AP) — Brandon McManus missed a 51-yard field goal as time expired, leaving Demaryius Thomas a winner in his homecoming as the Houston Texans escaped Denver with a 19-17 win over the Broncos.
The Texans (6-3) won their sixth straight and the Broncos (3-6) lost for the sixth time in seven games.
Thomas finished with three receptions for 61 yards, but two of them were back-to-back for 31 and 18 yards on the Texans' opening touchdown drive.
McManus' second miss of the game came after Case Keenum completed an 18-yard pass between two defenders to Emmanuel Sanders on fourth-and-8 from the Denver 45-yard line.
Keenum threw a 5-yard pass to tight end Jeff Heuerman, who had a career-best 10 catches for 83 yards and then running back Phillip Lindsay lost a yard.
After Denver called a timeout with 3 seconds left, the Texans did the same, then rushed the field in relief after McManus' kick drifted wide right.
After the Broncos took a 17-16 lead on Keenum's 12-yard dart to Heuerman between two defenders, Ka'imi Fairbairn put the Texans back ahead with a 37-yard field goal with 14:06 remaining.
It appeared as though Thomas was going to be the goat in his return to Denver just five days after his trade to the Texans when his false start helped thwart the Texans' last possession.
The Broncos got the ball back at their 14 with 3:29 left.
Thomas had started all 114 games for the Broncos since Jan. 8, 2012, when he caught an 80-yard touchdown pass from Tim Tebow on the first snap of overtime to beat the Pittsburgh Steelers 29-23.
This time, he drew loud ovations when he emerged from the tunnel for pregame stretch and again during a video tribute after "The Star-Spangled Banner."
Outside the stadium, the Broncos put up a giant "Thank you, D.T." banner at the bottom of a 10-story-high image of Thomas next to one of Miller, who said last week it was "super weird" not having Thomas as a teammate anymore.
"He's not even No. 88 anymore. He's No. 87," Miller told The Associated Press. "All you can say is that just shows you this is a business."
Thomas was among the Texans captains for the coin toss, which he lost by calling tails.
Denver deferred and Thomas went right to work , catching consecutive passes covering 31 and 18 yards as the Texans took a quick 7-0 lead on DeShaun Watson's 7-yard TD pass to tight end Jordan Thomas .
Cornerback Chris Harris Jr. held DeAndre Hopkins without a catch for much of the first half but when the Texans had the ball in the red zone, Watson found Hopkins for an easy 16-yard TD in between bracket coverage by safety Justin Simmons and cornerback Adam Jones for a 13-3 lead.
That was Watson's 36th career TD throw. The only other quarterbacks in NFL history to have 35 or more TD passes in their first 16 NFL games were Hall of Famers Kurt Warner and Dan Marino.
The Broncos pulled to 13-10 on Devontae Booker's 14-yard TD run , but two decisions by Broncos coach Vance Joseph backfired in the final 18 seconds of the first half.
First, he trotted out McManus for a 62-yard field goal try that didn't come close.
The Texans took over at the Broncos 48 and gained 20 yards on two plays. Fairbairn was wide right on a 46-yard field goal attempt but Joseph had called timeout and Fairbairn nailed the do-over for a 16-10 Houston halftime lead.
Texans: OLB Duke Ejiofor left in the first half with a shoulder injury.
Broncos: Center Matt Paradis sustained a serious right ankle injury when Keenum rolled up on him just before halftime. Paradis had never missed a snap in his four-year career. Right guard Connor McGovern moved over to center and Elijah Wilkinson came in at McGovern's spot.
Texans: Travel to Washington on Nov. 18 after a bye.
Broncos: Visit Los Angeles Chargers on Nov. 18 after a bye.