LAS VEGAS (KLAS) — It looked like it was going to be a long, long night for the Rebels.

After winning its Mountain West opener, UNLV returned to Allegiant Stadium on Friday for a conference clash against New Mexico. The Rebels were hoping for a good start, looking to win four of five to begin a season for the first time since 2003. But about 90 seconds into the second quarter UNLV trailed 17-0.

Then something clicked. The Rebels scored 24 unanswered points for a dramatic 31-20 victory before an announced crowd of 21,605.

“How about the Rebels, baby?” coach Marcus Arroyo said. “Whoooo. I’m still fired up! That’s such a huge deal for our group. It’s just a character-building win and that’s the bottom line.”

Quarterback Doug Brumfield sparked the rally, running for a 6-yard touchdown and passing to Ricky White for the 2-point conversion that tied the score at 17-17 midway through the third quarter.

UNLV went ahead for good when Aidan Robbins darted in for a 3-yard TD to start the fourth quarter for a 24-17 advantage.

Cameron Oliver then added the finishing touch, running an interception back for a TD with 28 seconds left, killing any chance for a comeback by the Lobos.

Brumfield, who was 24-for-33 passing for 233 yards with an interception, said UNLV stayed composed because it has experienced being behind in games. While trailing was nothing new, staging such a rally for a victory was.

“Just being in this situation before … we knew what we could do,” Brumfield said. “We knew how to adjust, what to expect … It’s just being prepared overall.”

Arroyo said the Rebels didn’t cave because his players have a belief, a confidence in what they are doing. He called that feeling in the program part of “changing the culture.”

He also called the poor start ugly. “There were a lot of things against us early on,” he said, “and to rally like that, to play like that in the second half, to play complimentary football in a situation like that, I mean our crowd and our stadium … we can feel that.

“We handled adversity (and) this is a huge step forward in resilience.”

The victory marks the second time UNLV has started 2-0 in conference play since the Mountain West was formed in 1999. The other time was 2013.

Adam Plant led the defensive surge in the second half. The Rebels had seven tackles for losses overall, including 1 1/2 by Plant, and allowed only a 36-yard field goal by George Steinkamp in the second half that pulled New Mexico (2-3, 0-2 Mountain West) to within 24-20 with 12:43 left.

But finding ways to extend drives was difficult for the Lobos; New Mexico was 2-for-11 on third down, 0-for-1 on fourth down. Plant said the Rebels get pumped when faced with stopping foes on key downs.

“It’s really become a mindset for the entire defense,” the 6-foot-5, 250-pound junior said. “We practice it every day. We call it three-down, just to put an emphasis on it … “

Linebacker Austin Ajiake also had a strong game for UNLV, with a dozen tackles, including two for losses.

The Lobos got their 17-0 lead on a pair of 8-yard TD runs by quarterback Miles Kendrick and a 33-yard field goal from Steinkamp.

Daniel Gutierrez made field goals of 41, 50 and 47 yards to get UNLV within 17-9 at halftime.

“That one hurt,” Lobos coach Danny Gonzales said. “That’s a crushed locker room. They should be. It hurt bad.”