Barry scored to give New Mexico State a 55-53 lead with 8:27 remaining, and the Aggies led the rest of the way.
Pascal Siakam added 12 point for New Mexico State (4-5), which has won 14-straight at home. The Aggies played without senior guard Daniel Mullings, who broke a finger on his right hand at practice on Thursday and will be out eight weeks.
C.J. Cooper and Cedrick Lang each scored 12 points, and Earvin Morris chipped in 10 to lead UTEP. Matt Willms had four blocks and nine rebounds for the Miners (4-3), who have lost three-straight games for the first time since November 2012.