Stanford dominated play over the final 10 minutes, pulling away after Connecticut made it a one-possession game midway through the second half.
The Cardinal have beaten the Huskies two straight after losing their first four meetings in the series.
Stanford never trailed after taking the lead midway through the first half. There were four lead changes and six ties.
Nastic and Allen allowed Stanford to overpower the Huskies on the boards, 48-24. The Cardinal's 18 offensive rebounds is a season-high.
Purvis hit a 3-pointer midway through the second half to draw the Huskies within 50-47 of Stanford.
The Cardinal went on a 14-2 run over the next seven minutes to pull ahead, 64-49, forcing a Connecticut timeout.
Stanford led by as many as eight points in the first half before the Huskies closed to within 32-29 at intermission.
Connecticut senior Ryan Boatright and Stanford senior Chasson Randle were co-winners of the Mr. Basketball of Illinois Award in 2011. It was the only time in the 33-year history of the award that voting resulted in a tie. . The Huskies and Cardinal last met at Maples Pavilion in 1999, when both teams were ranked in the top 10. Connecticut went on to the national title that year.
Stanford honored Brevin Knight during the game as part of its 100th anniversary of men's basketball. Knight led the Cardinal to its first ever Sweet Sixteen in 1997 (Stanford's 1942 national championship team went straight to the Final Four).
Connecticut returns to AAC action on Thursday, hosting Central Florida.
Stanford hosts Arizona in a Pac-12 contest on Thursday night.