HOUSTON (AP) -- Tom Brady threw for 371 yards and two scores, and Stephen Gostkowski made two long field goals in the fourth quarter as New England Patriots rallied for a 34-31 win over Houston.

The Texans' franchise-record skid reached 10 games.

The Patriots (9-3) trailed by 10 at halftime and the lead changed five times in a wild second half. New England tied it with a 53-yard field goal and took a 34-31 lead with another one from 53 with about three minutes left.

The Texans (2-10) had a chance late, but the offense stalled. On fourth-and-13, Case Keenum threw an incompletion as he was being hit.

Ben Tate ran for 102 yards and three touchdowns for the Texans, who haven't won since Sept. 15.