The game took three hours and fifty one minutes, but Arizona needed every second of it.
Entering the seventh inning stretch trailing 7-5, former catcher Riley Moore made his way to the press box to sing "Take Me Out to the Ballgame".
From there, the rally was on.
JJ Matijevic led off the bottom half of the inning with an absolute bomb to right center, sneaking the ball over the red line for a solo home run.
"I was just sitting fastball, and was ready for it and I did what I did," explained Matijevic of his home run.
NMSU went down 1-2-3 in the top of the 8th to bring the Wildcats right back to the plate after Cody Ramer stranded runners on the corners in the 7th.
Zach Gibbons started the 8th with a ground out, but a Bobby Dalbec single and a Ryan Aguilar double tied the game up at seven.
Matijevic came back up to the plate for the second-straight inning, and slashed the go-ahead hit to right, driving in Aguilar from second.
With Alfonso Rivas on the mound for the final five outs of the game, Arizona was able to close it out to avoid a bad midweek loss.
The game was sloppy from start to finish.
"We weren't ready to play and our at bats were bad," Matijevic said. "I had two bad at bats, but I stuck in there."
"It just can't happen with these starts."
"We did not play well at the beginning of this game," coach Jay Johnson added. "I was very disappointed about that, but we persevered, and it's a really great growth step for us."
Arizona committed three errors in the first two innings, which allowed the Aggies to take a 3-0 lead into the third.
Two runs in the third brought the Wildcats within one. Then Gibbons gave the Cats a 4-3 lead in the fourth with this hit:
NMSU answered right back, scoring one run of their own, but the Wildcats took a 5-4 advantage back after many things went down in the fifth, including a wild pitch that allowed Matijevic to score:
The pitching by the Wildcats was pretty bad for the most part all night, but Rivas had enough at the end to give them the win.
Arizona returns to action on Friday as they take on Cal in Berkeley. First pitch for that three-game series is scheduled for 7 PM PT.