San Diego State put together a 17-point run in the first half, but the Broncos rallied from 12 points down in the final six minutes and had a chance to pull out what would have been an improbable victory.
With the Aztecs holding only a one-point lead, Aqeel Quinn missed a 3-pointer for San Diego State.
That gave Boise State the opportunity to hit a game-winning shot and the Broncos let the clock wind down in hopes of doing just that.
Derrick Marks, however, missed a jumper with a second showing on the clock and Thames seized the rebound for the Aztecs. Thames was fouled and his free throws accounted for the final margin.
San Diego State improved to 12-2 for the season and has won both of its Mountain West Conference contests.
Thames and Winston Shepard both scored 16 points for the Aztecs and were the only San Diego State players to reach double figures.
Marks led the Broncos (11-4, 1-1 MWC) with 21 points.