Stacy Davis gave the Waves a four-point lead, 75-71 with 45 seconds left by hitting the first of two free throws. But Nick Faust answered for the 49ers by getting to the basket for a layup and then a dunk - the latter knotting the score with 19 seconds left.
Justin Bibbins missed a 3-point shot at the buzzer that would have given Long Beach State the win.
Lamond Murray Jr. scored 18 points and Raines added 16 as Pepperdine (5-4) won its third straight game to go over .500 for the first time this season. The Waves shot 31 of 60 from the field (51.7 percent), including 9 of 20 from distance.
Faust led the 49ers (5-6) with 14 points.