Trailing on the road in the fourth quarter, the New England Patriots needed Mac Jones to deliver on Sunday.

The rookie came through, throwing a touchdown pass to tie it before Nick Folk’s 21-yard field goal with 15 seconds left lifted the Patriots to a 25-22 win over the Houston Texans.

The game was tied at 22 before New England (2-3) used a 15-play, 85-yard drive capped by Folk’s fourth field goal of the game to take the lead. The drive was kept alive when Maliek Collins was flagged for roughing the passer on third-and-18 early in the possession.

Houston rookie Davis Mills threw an incompletion after Folk’s field goal before Brandin Cooks fumbled after a catch to seal New England’s victory.

Jones tied it when he connected with Hunter Henry on a 13-yard touchdown with about nine minutes remaining.

“Mac has been good for us all year in terms of his leadership and resilience,” coach Bill Belichick said. “We are counting on him to do the right thing, and he’s doing it on a high level.”

Jones threw for 231 yards with a touchdown and an interception as the Patriots ended a two-game skid.

“Sometimes you have to find a way to win,” said Jones, the 15th overall pick in the draft. “It feels better to not play as well, but win and learn at the same than play OK and end up losing. So the win feels good.”

Jones completed 23 of 30 passes to give him 135 completions this season and tie Cincinnati’s Joe Burrow for the most completions by a rookie quarterback in his first five starts in NFL history.

New England center David Andrews raved about the poise of Jones down the stretch.

“What a great win for him,” Andrews said. “What a great win for this football team. We needed it.”

Mills threw for a career-high 312 yards with three touchdowns to bounce back from last week’s terrible performance where he tied a franchise record with four interceptions.

“Davis protected the football,” coach David Culley said. “He was very good in the pocket and ran our offense very well. We knew going into the game, the most important thing to do was be able to protect the football and he did that.”

But he was unable to move the ball late as the Texans (1-4) lost their fourth straight after beating Jacksonville in the opener.

“You don’t want to lose football games ever, so it’s a harsh feeling,” Mills said. “But the guys rallied together. We (played) how we wanted to a lot during that game, and we can learn from that and find ways to win.”

Belichick continued his success against rookie quarterbacks, improving to 23-6 in those games.

Mills threw a 37-yard touchdown pass to Chris Conley on a flea flicker early in the third to extend Houston’s lead to 22-9.

The Texans made an embarrassing mistake later in the third when Cameron Johnston’s punt bounced off the back of teammate Terrence Brooks for zero yards, giving the Patriots the ball at the Houston 36. New England took advantage of the mistake when Folk made a 52-yard field goal that cut the lead to 22-12.

Folk added a 32-yard field goal later in the third to get the Patriots within 22-15 and the Texans missed a 56-yard field-goal attempt early in the fourth quarter.

Mills looked good early as the Texans capped an 18-play drive that took 10 minutes with an 11-yard TD pass from Mills to Antony Auclair. Ka’imi Fairbairn, who made his debut last week after opening the season on injured reserve, missed his first extra point attempt of the season to leave Houston up 6-0.

Damien Harris took a direct snap in the wildcat formation and ran 1 yard for a touchdown for New England early in the first and Nick Folk missed the PAT to tie it at 6-6.

The Texans regained the lead when Chris Moore, who was promoted from the practice squad Saturday, made a leaping catch to grab a short pass and dash for a 67-yard TD. Fairbairn missed again to leave Houston up 12-6.

It is the second time in franchise history that the Texans have missed two extra points in a game and the first since Fairbairn also missed two in a 27-20 loss to the Falcons on Oct. 6, 2019.

The Patriots had a chance to tie it after that, but Harris fumbled near the goal line, and the Texans recovered it.

The teams exchanged field goals after that, to leave the Texans up 15-9 at halftime.

INJURIES

Houston left tackle Laremy Tunsil left the game in the third quarter with a thumb injury. ... Harris had to be helped off the field in the fourth quarter with a rib injury.

PILING ’EM UP

New England linebacker Matt Judon had two sacks Sunday to give him 6 1/2 this season, which is the most in franchise history through five games. He’s the first Patriots player to have a sack in four games in a row since Jamie Collins and Chase Winovich both did it in 2019.

UP NEXT

Patriots: Host Dallas next Sunday.

Texans: Visit Indianapolis next Sunday.