Right when it looked like Mississippi State’s football season was about to collapse in a heap of disappointment, first-year head coach Joe Moorehead and senior quarterback Nick Fitzgerald waved a magic wand, and — voila — the Bulldogs all of sudden were awash with new life.

After going just 3-3 in its past six games, and after scoring only three points two weeks ago in a lopsided loss to LSU, Mississippi State was given up for dead.

Then last week against Texas A&M, the Bulldogs (5-3, 2-3 Southeastern Conference) worked their magic and handed the Aggies a good, old-fashioned 28-13 whuppin’ that wasn’t as close as the score made it seem.

And now the Bulldogs sit at No. 18 in the first College Football Playoff ranking that was released Tuesday night.

But Louisiana Tech is awaiting a challenge, and these Bulldogs aren’t lurking in any shadows. A dangerous, veteran Louisiana Tech team travels to Starkville, Miss., for a Saturday night game under the lights at David Wade Stadium.

Louisiana Tech gave the same LSU squad that beat up Mississippi State, a scare earlier in the season. And now Tech (6-2, 4-1 Conference-USA) has won three straight and is bowl eligible for the fifth consecutive year under Skip Holtz. Holtz’s squad last played on Oct. 26 when they snapped Florida Atlantic’s 10 game win streak and won for the fourth time this season on the road.

“It was a huge win on the road,” Holtz said. “It’s great to be bowl eligible … it hadn’t even been talked about. That’s the great thing about this team.

If Mississippi State looks past the Bulldogs from Ruston, La., Louisiana State will be ready to pounce.

Quarterback J’Mar Smith has thrown for 1,938 yards with 12 touchdowns and six interceptions. Louisiana Tech is averaging 390.8 yards of total offense and 28 points per game this season.

Smith has two capable wide receivers in Adrian Hardy and Teddy Veal. Together, they have combined for 86 receptions and more than 1,000 yards this season.

“The battle cry has been to play together, keep banging that rock and keep getting better. We’ve just got to keep improving,” Holtz said.

One player who has been following that mantra is defensive end Jaylon Ferguson. Ferguson leads the nation this year with 10.5 sacks, and is the nation’s active career leader with 38 sacks. For his efforts, Ferguson has been named one of 20 semifinalists for the 2018 Chuck Bednarik Award, which is given to the College Defensive Player of the Year.

Fitzgerald against Ferguson should be a matchup worth the price of admission. When Fitzgerald plays like he did against the Aggies, Mississippi State is very dangerous.

He bounced back from one of the worst performances of his career on Oct 20 against LSU (59 yards passing and four interceptions). In the win over Texas A&M, Fitzgerald compiled 329 yards of offense and accounted for four touchdowns.

On Monday, he was awarded co-Southeastern Conference Player of the Week (with Georgia’s Jake Fromm), for a school-record sixth time.

“I think that’s exciting and great for him,” Moorhead said. “It was excellent validation for him to come out and bounce back and play like he’s capable of playing — doing things in both the run and pass game and leading the team and being resilient and being a captain and all the things that go along with it, being a great teammate. I thought it was a good day for the whole team and an excellent day for Nick.”

In last year’s 57-21 win over Louisiana Tech, Fitzgerald threw for three touchdowns and ran for two more. But that was last year and this year.

The La. Tech defense is much improved.

Eight starters return and junior college transfers — reigning JUCO Defensive Player of the Year Connor Taylor and safety Daniel Lewis — have blended perfectly.

With Ferguson on the prowl for more sacks, Fitzgerald will be hard-pressed to repeat what he did last year.