HOUSTON (AP) — C.J. Stroud threw for 331 yards and a touchdown and Ka′imi Fairbairn’s tiebreaking 59-yard field goal as time expired lifted the Houston Texans to a 23-20 win over the Buffalo Bills on Sunday.

The Texans (4-1) led 20-3 after a field goal early in third quarter before the Bills scored 17 straight points to tie it with about 3½ minutes to go.

Stroud was called for intentional grounding to bring up fourth-and-15 and take the Texans out of field-goal range with less than a minute left.

A punt backed the Bills up to their 3 and they punted after three straight incomplete passes to give Houston one last chance.

Dare Ogunbowale had a 5-yard run to set up Fairbairn’s game winner.

Already without running back Joe Mixon for a fourth straight game, Houston struggled offensively after losing NFL receiving leader Nico Collins to a hamstring injury after he scored a long touchdown early in the second quarter.

Stefon Diggs led the Texans with six receptions for 82 yards in his first game against his former team since a blockbuster offseason trade.

Josh Allen was 9 of 30 for 131 yards and a touchdown as the Bills (3-2) lost for a second straight week after opening the season with three straight wins. Allen struggled before halftime again Sunday, managing just 56 yards passing a week after throwing for 42 yards in the first half of a rout by the Ravens.

Dawuane Smoot’s strip-sack of Stroud gave the Bills the ball at the Houston 15 with 4½ minutes to play.

They had the first play of the ensuing drive with Mitchell Trubisky at QB while Allen was in the medical tent being checked out after banging his head hard on the turf a few plays earlier. He re-entered the game on second down but threw two incompletions.

The Bills tied it on a 33-yard field goal.

The Texans were driving with about eight minutes left when Terrel Bernard intercepted a pass intended for Diggs to give Buffalo the ball at its 20.

The Bills couldn’t move the ball and had to punt, but soon got it back on the strip-sack.

The Bills cut the lead to 10 when James Cook scored on a 5-yard run with about nine minutes left in the third quarter.

Rookie Keon Coleman’s 49-yard reception on fourth-and-5 got the Bills within 20-17 on their next drive. Coleman slipped a tackle and then darted down the sideline before flipping into the end zone for his second TD this season.

The touchdown pass was the 231st in Allen’s career, tying him with Patrick Mahomes for the most by a player in his first seven seasons.

The Texans took a 7-3 lead when Cam Akers ran 15 yards for a touchdown with about three minutes left in the first quarter. Ogunbowale had a 38-yard catch-and-run on third-and-5 to keep that drive going.

Collins got in front of the defense for a 67-yard touchdown reception on the first play of Houston’s next drive to extend the lead to 14-3.

Fairbairn added a 50-yard field goal as time expired in the second quarter and his 47-yarder early in the third made it 20-3.

Injuries

Texans RB British Brooks left with a knee injury in the first quarter. … S Jimmie Ward left in the second with a groin injury.

Up Next

Bills: Visit the New York Jets on Monday, Oct. 14.

Texans: Visit New England next Sunday.