JACKSONVILLE, Fla. — The Jacksonville Jaguars have gone from the worst team in the NFL to the hottest team in the AFC.

And they’re enjoying it.

Chad Henne threw two touchdown passes, Jordan Todman scored on some trickery and the Jaguars held on to beat the Houston Texans 27-20 on Thursday night.

The Jaguars (4-9) won their third straight — their fourth victory in five games since a bye — and continued to show signs of progress under first-year coach Gus Bradley. They have the longest winning streak in the AFC.

“Four out of five, yeah, you’re feeling good,” Henne said.

Jacksonville also won at home for the first time since Nov. 25, 2012, against Tennessee.

“Our guys just really believe,” Bradley said. “The biggest challenge is to keep doing what we’re doing. We’re a young team that’s learning how to do this.”

Houston (2-11) extended its franchise-record losing streak to 11 games, a stunning stretch of futility that could lead the franchise to fire coach Gary Kubiak.

“It’s been a gut-wrenching experience,” said Kubiak, whose team has lost eight games by seven points or less. “We’ve been in so many close games.”

Kubiak and the Texans looked as if they would end the streak after a quarterback change, but Geno Hayes intercepted Matt Schaub’s pass with 2:08 remaining to seal Jacksonville’s first series sweep since 2009.

Schaub came off the bench and carved up Jacksonville’s secondary in the second half.

He replaced starter Case Keenum late in the third quarter and led the team to a touchdown and a field goal in his first two possessions. The Texans were in the red zone again, but failed to convert a fourth-down play with 3:37 remaining.

Jacksonville picked up a huge first down that flipped the field — not surprising that it came on a penalty — but punted.

Hayes picked off Schaub’s next pass, a floater over the middle.

The Jaguars milked the clock from there, and Josh Scobee’s 39-yard field goal provided some insurance. The Texans had one final chance — they needed to go 77 yards in 20 seconds and without a timeout — but Schaub was sacked to end the game.

Jacksonville players ran on the field to celebrate.

PHOTO: Sam Greenwood/Getty ImagesGeno Hayes of the Jaguars asks the crowd for noise.

“For what they’ve gone through and to stick to it and have some results go their way, it’s pretty cool,” Bradley said. “Our team continues to show that they’re sticking to it, believing and making plays at critical times.”

Schaub completed 17 of 29 passes for 198 yards, with a touchdown and an interception. Andre Johnson caught 13 passes for 154 yards.

Still, the Texans walked off the field with an all-too-familiar feeling.

Turnovers were a problem again for Kubiak’s team. Penalties were an even bigger problem.

Houston was flagged 14 times for a team-record 177 yards — many of them extending drives.

Offensive co-ordinator Jedd Fisch dialed up a double pass that led to a score and a 24-10 lead in the third quarter. Henne threw behind the line of scrimmage to receiver Ace Sanders, who then heaved a deep ball across the field to running back Todman.

No defender was near Todman as he camped under Sanders’ throw. Rookie D.J. Swearinger pushed Todman just as he hauled in the 21-yard TD reception.

It was the second consecutive week a non-quarterback threw a TD pass for Jacksonville. Maurice Jones-Drew tossed an eight-yard score to college teammate Marcedes Lewis in a 32-28 win at Cleveland last week.

Sanders and Jones-Drew now have as many TD passes this season as benched Jaguars starter Blaine Gabbert.

Henne completed 12 of 27 passes for 117 yards.

He hooked up with Lewis for a one-yard scoring strike in the first quarter and found Cecil Shorts III for a six-yarder in the second.

The Jaguars took the opening kickoff and drove 80 yards for the team’s fourth opening-drive touchdown in its last five games.

Houston punted on its first three possessions, creating more momentum for the home team.

Henne’s second TD pass gave Jacksonville its largest lead (14 points) of the season. Henne hit Shorts out of bounds on a second-down play, but went right back to his leading receiver on the next snap. Shorts beat Johnathan Joseph on a quick out.

Jones-Drew carried 14 times for a season-high 103 yards. He left the game late in the fourth with a hamstring injury, but said he would be fine.

The Jaguars are enjoying a modest turnaround after starting the season 0-8. Two victories came against Houston, including a 13-6 punt-fest 11 days ago.