FULLERTON, Calif. (AP) - Malachi Flynn hit a go-ahead 3-pointer with 5 seconds remaining, lifting Washington State to a 75-71 victory over Saint Joseph's after the Cougars rallied from a 20-point first-half deficit in the opening round of the Wooden Legacy on Thursday.

Robert Franks scored 19 points and Viont'e Daniels added 17 points for the Cougars (4-0), who earned their third comeback win of the season.

Shavar Newkirk led Saint Joe's with 24 points, but he turned the ball over with 2.5 seconds left and he missed a 3-pointer at the buzzer.

The Cougars made 16 3-pointers, led by Daniels who sank 5 of 6. Flynn and Carter Skaggs had three each.

Saint Joe's took a 36-16 lead in the first half after a 23-0 run. The Cougars missed 10 straight shots over a 6½-minute stretch and eventually trailed 38-24 at halftime.

Washington State played like a different team in the final 20 minutes, making 10 3-pointers.

After Franks hit a 3-pointer, Newkirk made four straight free throws to pull Saint Joe's into a 69-all tie.

Franks made a free throw and missed the second for a 70-69 lead. Newkirk's two free throws gave the Hawks (2-2) their last lead at 71-70.

Flynn tossed up the go-ahead 3 with the shot clock winding down and Daniels made two free throws to seal the win with 2 seconds left.