The victory helped move the Bobcats closer to locking up the No. 3 seed at next weekend's Big Sky Conference championship in Sacramento, Calif.
A win over Sacramento State on Thursday would secure a top three finish.
Montana opened the contest winning at No. 2 and 3 doubles for the first point of the match. MSU's lone doubles victory came at the top spot, where Jakub Dybala and Pawel Turzanski combined for an 8-4 win over Mikolaji Borkowski and Carl Kuschke.
"Obviously, you do not want to start a match down 1-0," said MSU men's coach Mike Phillips. "We competed tough and played with a lot of heart, but doubles is something we need to work on before the Big Sky championships."
The Grizzlies quickly went up 2-0 as Kuschke defeated Alberto Fuentes 6-3, 6-0.
Montana State (13-9, 5-2) answered as Corey Smith posted a 6-4, 6-1 win at No. 1 singles over Colin Dektar. Bobcat sophomore Fletcher Keyes tied the score at 2-2 with a 6-3, 6-2 decision over Felipe Raw. The victory was Keyes' sixth consecutive win at No. 4 singles.
MSU took its first lead of the match as Dybala recorded a 6-3, 6-4 win at No. 2 singles over Borkowski. UM's Raydner Ramos tied the contest at 3-3 with a 7-5, 6-3 decision over Turzanski at the No. 3 position.
"Montana is always a tough competitor," Phillips said. "It is always a battle and I had a feeling the match could go the distance."
The final outcome was decided at No. 6 singles as MSU's Esteban Ferrero rallied from a first set 6-1 loss. Ferrero rebounded, winning 6-3, 6-3 in the final two sets over David Cysneiros.
"Esteban did a great job executing," Phillips said. "He gave us a really gutsy performance."
Montana State will face Sacramento State on Thursday, before beginning the Big Sky Conference tournament on Friday.
Montana State 4, Montana 3
Singles: 1. SMITH, Corey (MSU) def. DEKTAR, Colin (UM) 6-4, 6-1; 2. DYBALA, Jakub (MSU) def. BORKOWSKI, Mikolaj (UM) 6-3, 6-4; 3. RAMOS, Raydner (UM) def. TURZANSKI, Pawel (MSU) 7-5, 6-3; 4. KEYES, Fletcher (MSU) def. RAW, Felipe (UM) 6-3, 6-2; 5. KUSCHKE, Carl (UM) def. FUENTES, Alberto (MSU) 6-3, 6-3; 6. FERRERO, Esteban (MSU) def. CYSNEIROS, David (UM) 1-6, 6-3, 6-3. Doubles: 1. DYBALA, Jakub/TURZANSKI, Pawel (MSU) def. BORKOWSKI, Mikolaj/KUSCHKE, Carl (UM) 8-4; 2. RAMOS, Raydner/RAW, Felipe (UM) def. FUENTES, Alberto/SMITH, Corey (MSU) 8-2; 3. DEKTAR, Colin/CYSNEIROS, David (UM) def. KEYES, Fletcher/PERKINS, Myles (MSU) 8-3.