No. 1 Duke pulled out all its magic tricks Friday to rally past Texas 85-78 in overtime at the PK 80 Tournament in Oregon.

Down 12 points at halftime, and 16 midway through the second half, Duke looked poised to drop its first game of the season. But the inside freshmen duo of Marvin Bagley III and Wendell Carter Jr. dominated down the stretch.

Bagley scored a game-high 34 points with 15 rebounds, matching a Duke freshman scoring record in the process. Bagley was a load in the paint, routinely slipping behind Texas' defense to throw down raucous dunks.

Star Duke senior guard Grayson Allen scored all 12 of his points in the second half, but he fouled out late in regulation. With Allen on the bench, it was up to Duke's cast of freshmen to get the job done, and they didn't let coach Mike Krzyzewski down.

Dylan Osetkowski led Texas with 19 points and seven rebounds, using his strength to get deep into the paint. Guard Kerwin Roach II added 18 points, but Texas lost composure when Duke charged back late.

Duke, playing in the tournament's Motion Bracket, next faces the winner of Friday night's Florida-Gonzaga matchup.