Samaje Perine capped a 75-yard drive by scoring on a 3-yard touchdown with 1:57 remaining as the visiting Cincinnati Bengals outlasted the Houston Texans 37-31 on Sunday.

Bengals quarterback Brandon Allen passed for a career-high 371 yards with two touchdown passes and engineered the scoring march that lifted the Bengals (4-10-1) to their second consecutive victory. Cincinnati last won back-to-back games in Weeks 4 and 5 in 2018.

The Bengals racked up 540 yards, while the Texans had 488. Houston lost its fourth straight game.

Houston (4-11) had taken its first lead at 31-27 when Deshaun Watson found Darren Fells for a 22-yard touchdown with 6:15 left. Watson, who passed for 324 yards and three touchdowns, set a franchise record with his 30th scoring pass this season. But with 1:28 left, Sam Hubbard recorded a strip-sack of Watson and Margus Hunt recovered the fumble to seal the win for Cincinnati.

David Johnson posted his first 100-yard rushing game for Houston with 128 yards while Brandon Cooks had his second 100-yard receiving game with seven catches and 141 yards.

The third quarter was an offensive showcase with Cincinnati compiling two 75-yard touchdown drives while the Texans did the same. Perine rumbled 46 yards through a series of broken tackles for a touchdown and a 17-10 lead before Johnson pulled the Texans even with 9:05 left in the third on his 4-yard scoring run.

Allen responded with a series of exceptional passing precision, completing 4 of 4 attempts for 83 yards, including a perfect 20-yard touchdown pass to Tee Higgins. Watson and Johnson followed by combining on a 2-yard scoring pass that tied the score at 24 with 55 seconds left in the third.

Allen got off to a hot start, going 5 of 5 for 65 yards on the Bengals’ opening possession, a drive capped by his 8-yard scoring pass to Drew Sample — the first career touchdown for Sample.

The Texans attempted to match but stumbled in the red zone following a 50-yard Watson-to-Cooks pass play, settling for a 21-yard Ka’imi Fairbairn field goal and 7-3 deficit. The Bengals squandered opportunities to extend to a commanding lead by failing to convert on fourth down in Texans territory and by also misfiring on a 49-yard Austin Seibert field goal.

Cincinnati amassed 229 yards in the first half with a 20:02 time of possession yet went into the intermission tied at 10-10 after Watson hit Cooks for a 25-yard touchdown at the 1:54 mark of the second period. For Watson, it was his 13th touchdown outside of the red zone, an NFL-best.