After the Vikings got called on two penalties and threw two incomplete passes, Carter's 65-yard punt return put the Hornets ahead with 3:17 left to play.
Portland State had one last chance to score, but on fourth-and-8 a holding call pushed the Vikings to fourth-and-18, and the next pass attempt was incomplete.
The game saw six lead changes and four ties.
Carter finished with 134-yards receiving, including a 61-yard touchdown catch, and Safron threw for 290 yards and three touchdowns.
Nate Tago led Portland State (3-8, 2-5) with 76-yards rushing and two touchdowns.