HOUSTON, Texas (KTRK) -- Deshaun Watson spun out of a would-be sack and coolly completed a pass that set up the winning field goal in overtime as the Texans rallied from a double-digit second-half deficit for a 22-19 victory over the Buffalo Bills in the first round of the playoffs Saturday.
Both teams punted on their first possessions of overtime - the first extra period in an AFC wild-card game since January 2012. On Houston's next drive, Watson evaded a sack by wriggling away from one defender and bouncing off another before rolling out to find Taiwan Jones for a 34-yard reception to set up first-and-goal.
Watson flexed both arms as the crowd at NRG Stadium went wild - knowing their team was in position to pull off another comeback win to Houston's playoff history.
"I told myself to stay up. I mean, it's do-or-die now. I just had to make the play," Watson said.
Ka'imi Fairbairn then kicked a 28-yard field goal to lift Houston to the victory.
The Texans (11-6) advance to the divisional round of the playoffs next weekend where they'll face either the Chiefs or the Ravens depending on the outcome of Saturday night's Titans-Patriots wild-card game.
The Texans got a boost from the return of J.J. Watt, who had a sack that helped spark his team. Houston scored 19 straight points to take the lead before Stephen Hauschka's 47-yard field goal tied it with 5 seconds left to force overtime.
"We never quit, regardless," Watson said. "Whatever it takes to get the win. I mean, we're going to keep fighting."
It was Watt's first game after sitting out since October with a torn pectoral muscle.
WATCH: JJ Watt reflects after Texans defeats Bills
"This is why you come back," Watt said. "I don't know if I meant to come back for these many plays or this much extra time, but these feelings, these emotions, these fans, these players, Deshaun Watson and all the guys on this team, this is why you come back."
The win gives the Texans their first playoff victory since the 2016 season and extends Buffalo's postseason losing streak to six games, with their most recent playoff win coming in 1995. It's the first wild-card overtime game since the Broncos beat the Steelers 29-23 in the 2011 season.
The game conjured memories of another huge comeback in a wild-card game. The last time teams from Houston and Buffalo met in the playoffs it was in a game that is known as "The Comeback." The Bills set an NFL record for the largest comeback in NFL history by rallying from a 32-point deficit for a 41-38 overtime win against the Houston Oilers in a wild-card game in 1993.
This time Josh Allen and the Bills (10-7) used a dominant first half to build a 13-point lead and were up 16-0 in the third quarter.
Watson had 247 yards passing and ran for 55 yards and DeAndre Hopkins had 90 yards receiving.
Allen threw for 264 yards, ran for 92 and caught a touchdown pass on a trick play in the first quarter, but often looked rattled late in his playoff debut.
WATCH: Texans head coach Bill O'Brien on close game
Houston couldn't get anything going on offense before halftime and had 81 yards in a first half where Hopkins didn't catch a pass for the first time since Week 16 of the 2017 season.
They were finally able to sustain a drive on their second possession of the third quarter when Hopkins had receptions of 14 and 10 yards to help move the ball. The Texans cut the lead to 10 when Watson dragged two defenders into the end zone on a 20-yard touchdown run.
Watson then dived into the end zone for a 2-point conversion that got Houston within 16-8 with about two minutes left in the third.
The Bills were driving early in the fourth quarter when Allen was sacked by Whitney Mercilus and fumbled, and it was recovered by Jacob Martin at the Buffalo 47. Houston cashed in on the miscue with a 41-yard field goal that cut the lead to 16-11 with about 11 minutes to go.
Watson connected with Carlos Hyde on a 5-yard touchdown pass and Hopkins on a 2-point conversion with about five minutes left to put the Texans on top 19-16. Hopkins had a 41-yard reception earlier in that drive.
The Bills were in field-goal range on their next drive when Allen got a 14-yard penalty for intentional grounding and Buffalo lost a down to bring up fourth down. They went for it and Allen was sacked by Jacob Martin for a 19-yard loss to give Houston the ball back with 1:41 left.
The Texans trailed 13-0 at halftime and Hopkins fumbled on their opening drive of the third quarter to give Buffalo the ball at the Houston 32. Watt sacked Allen for a loss of 8 yards on third down and the Bills settled for a 38-yard field goal to extend the lead to 16-0.
Allen scrambled 42 yards for a first down on Buffalo's first possession for its longest rush of the season. Two plays later, the Bills used some trickery to take the lead when John Brown threw a 16-yard touchdown pass to Allen to make it 7-0. Brown's pass was wobbly, but Allen was wide open despite having to slow down to grab it.
It was early in the second quarter when Allen appeared to fumble, and it was recovered by Houston. But the play was reviewed and overturned, giving Buffalo the ball at the Houston 32. The Bills were unable to move the ball after that and made a 40-yard field goal to make it 10-0.
The Bills added another 40-yard field goal at the end of the second quarter to push the lead to 13-0 at halftime.
The Associated Press contributed to this report.