MIAMI (AP) -- When it mattered most, the Houston Texans performed like a playoff team - which they might yet be.
The Miami Dolphins played like a team going nowhere, which is likely the case.
With both teams seeking to stay alive in the AFC playoff race, the Texans scored on their first five possession Sunday and survived Miami's comeback to win 27-20.
The Texans (8-7) built a 27-0 lead and won despite being outscored 20-0 in the final 31 minutes. They kept alive their slim hopes of making the playoffs for the first time.
''That's why we're here - to take this franchise to the next level,'' said Matt Schaub , who threw for 286 yards and two early scores. ''All we can do is control what we do, and that's what we did today.''
The defending AFC East champion Dolphins (7-8) were all but eliminated, and given the stakes, they seemed shockingly listless at the outset. The ball bounced off Dolphins receivers, Texans bounced off Miami tacklers, and Schaub repeatedly found receivers wide open.
''It's unacceptable for us to play like this when the season is on the line,'' Miami running back Ricky Williams said.
Boos began midway through the first quarter, and the Texans made sure the jeers grew louder. At one point Houston enjoyed advantages of 15-2 in first downs and 307-46 in yards.
''It's almost as if you can call any play and it's going to work,'' Schaub said.
Miami linebacker Jason Taylor stood in front of the bench screaming at teammates, and maybe the rant helped. The Dolphins rallied, and a field goal cut the deficit to 27-20 with 2:30 left before Houston recovered an onside kick and ran out the clock.
The Dolphins' comeback might have been complete if not for a tripping penalty on Lousaka Polite , which negated a 62-yard touchdown pass from Chad Henne to Ted Ginn Jr. in the third quarter.
''We dug ourselves too big a hole,'' receiver Greg Camarillo said. ''We had a terrible start.''
Houston remained the only NFL team the Dolphins have never defeated. The Texans' other four wins in the series were decided by a field goal or less.
The result bruised more than the Dolphins' pride. They lost linebacker Channing Crowder on the second play with a right foot injury, and Williams played only one snap after hurting his right shoulder in the third quarter.
Schaub went 20 for 31 and directed an offense that netted 406 yards, topping 400 for a franchise-record third game in a row. Andre Johnson scored once and made five catches for 71 yards for his second consecutive 1,500-yard season.
The victory left the Texans on the verge of their first winning season. They play host to New England in the regular-season finale next Sunday.
''That's why I came here - to get this team and this organization in position like this,'' fourth-year coach Gary Kubiak said.
A gamble by Kubiak contributed to the Texans' fast start. With a fourth-and-1 at the Miami 10, he decided against a field-goal try, and Johnson made the move pay off with a touchdown catch to cap an 80-yard drive for a 10-0 lead.
''It was a gutsy call,'' Johnson said. ''We have to have the coach's back by converting. If we don't convert it, everybody will talk bad about him.''
Then came a 94-yard drive capped by another TD, with Jacoby Jones juking a defender to turn a short pass into a 44-yard score. That made it 17-0 as the boos grew louder.
''The fans deserved better today,'' coach Tony Sparano said. ''Not the type of game that we wanted to play.''
When a pass deflected off Williams' shoulder pads, Brian Cushing intercepted, and three plays later Arian Foster scored untouched up the middle on a 17-yard run for a 24-0 lead.
''It just seemed like everything was working for us, no matter what we did,'' Johnson said.
That changed in the second half. On the sideline, Johnson hid his head under a towel as the Dolphins rallied with scoring drives of 61, 79, 74 and 58 yards.
With Williams sidelined, Lex Hilliard scored on a 2-yard run and a 10-yard pass from Henne. But Houston held on.
''We labeled this game as the biggest game of the franchise's history,'' Texans tackle Duane Brown said. ''We took the wind out of them quick.''
Notes: Dolphins G Justin Smiley left the game in the fourth quarter with a knee injury. ... Houston S Dominique Barber (hamstring) left in the second half. ... Johnson joined Marvin Harrison in 2001-02 as the only players with consecutive 1,500-yard receiving seasons. ... Houston set a team mark for road victories in a season with five.