MANHATTAN — Kansas State’s defense was looking for a spark.

The Wildcats were trailing No. 18-ranked Texas 19-0 at halftime and were well on their way to a second straight Big 12 loss. And yet something suddenly occurred to them.

“I just kept yelling, ‘The game’s not over, the game’s not over,’ ” Reggie Walker said. “I feel a few people were down, but not too many.”

Perhaps epiphany is too strong a word, but the defense realized that, despite a rash of missed tackles and the fact that the Longhorns had converted on five of their eight third downs, they essentially only had 10 points to show for it.

Texas put together one 89-yard touchdown drive and another 53-yarder that resulted in a field goal, but the other points came on a 90-yard punt return and a safety with the defense on the sideline.

“We were pretty fired up,” said Walker, a junior defensive end who finished with four tackles, including two sacks and a forced fumble. “Because I felt at halftime, once the confidence hit and we knew that we could be a way better team than we were playing, that was a big part of everybody (getting) in the game and coming together as a team and going out there and showing what we really can do.”

The Wildcats still lost, 19-14, falling to 2-3 overall and 0-2 in the Big 12. But they did not allow another point while holding Texas to 148 total yards after the break.

“I was proud of the way we fought,” junior defensive tackle Jordan Mittie said. “Anytime you’re on defense and give up 10 points, that’s 10 points too many, (but) I’m proud of the effort we gave and how we fought.

“We’ve definitely improved every game, so that’s exciting for us.”

Just from the conference opener the week before, a 35-6 loss at West Virginia, the Wildcats improved their standing in every defensive category. They started league play ranked ninth in the Big 12 in scoring defense (26.8 points per game) and total defense (409 yards), dead last in run defense (178.0).

Heading into Saturday’s 2:30 p.m. game at Baylor, they’re seventh overall (395.0), eighth against the run (164.6) and in scoring defense (25.2). Nationally they went from 93rd to 84th in total defense, from 87th to 79th against the run and from 76th to 65th in scoring defense, all while playing a nationally ranked team.

“I think our guys played well,” K-State coach Bill Snyder said of the defense. “We responded well to a variety of situations.

“We were not as effective in the first half in regards to third-down situations, (but) we got much better in the second half. Overall I think (the defense is) playing well, and playing a little short-handed there as well.”

True, the Wildcats have been hit hard by injuries on defense.

Starting safety Denzel Goolsby has been out since the second game and nickelback Walter Neil did not play against Texas. Linebacker Elijah Sullivan has missed two of the last three games and Sam Sizelove, who started in his place, was hurt against the Longhorns.

“Coach Snyder preaches it’s not just Team 1, it’s Team 2 and Team 3 — next-play mentality,” said junior linebacker Justin Hughes, who saw his most extensive action against Texas, recording six tackles with one for loss. “If the guy in front of you goes down, you better know what you’re doing when you get out there because that’s your chance.

“I felt I’ve made the best of mine.”

Snyder still wasn’t ready to give the defense a complete free pass against Texas. Especially after the Longhorns put together a drive at the end of the game that ran the final 6 minutes, 20 seconds off the clock.

They also connected on 30 of 38 passes for 228 yards. That averaged out to just 7.6 yards per completion, but it was enough to help produce three key first downs on that final drive.

“I think our guys are playing within the confines of the system quite well,” Snyder said. “For the most part it boiled down to third-down situations — we weren’t very good in the first half; we were much better in the second half until their last drive.

“So we didn’t finish the second half like we started it.”

The Wildcats face another stiff challenge at Baylor, where the Bears have struggled defensively but rank 12th nationally in passing offense at 331.4 yards per game and 22nd in total offense at 488.

But Wyatt Hubert, the redshirt freshman defensive end from Shawnee Heights, remained optimistic.

“We’re almost there,” he said. “The second half (against Texas) is when I thought we were playing Kansas State football.

“They didn’t score any points in the second half and we scored 14 on the offensive side of the ball. We’ve just got to do that all four quarters and not just one half.”