PORTLAND, Ore. -- Freshman Marvin Bagley III had a career-high 34 points and added 15 rebounds, and No. 1 Duke rallied to defeat Texas 85-78 in overtime on Friday in the semifinals of the PK80 Invitational.
Duke advanced to play the winner of Friday night's late game between No. 7 Florida and No. 17 Gonzaga for the title on Sunday.
Dylan Osetkowski had 19 points and seven rebounds for Texas (4-1), which fell short of its first-ever victory over a top-ranked team.
Bagley made consecutive dunks to give the five-time NCAA champion Blue Devils a 78-73 lead in overtime. Andrew Jones' layup pulled Texas within 78-77 with 1:20 left. Wendell Carter's put-back dunk pushed Duke's lead to 82-78 and Trent's free throws with 11 seconds left sealed the win.
Bagley tied the Blue Devils' freshman scoring record set by J.J. Reddick on Jan. 15, 2003, against Virginia.
Bagley's short jumper tied it at 70 and put the Duke fans in the crowd on their feet. Allen fouled out with 2 minutes left in regulation and Kerwin Roach II dunked to put Texas back in front 72-70.
Trent made a layup and his free throw gave Duke a 73-72 lead with 32.8 seconds left. Coleman made a free throw on the other end to re-tie it but missed the second and the game went to overtime.
The tournament celebrates Nike co-founder Phil Knight's 80th birthday.
Duke and Texas were in the Motion Bracket, playing Friday at the Moda Center, home of the Portland Trail Blazers. Teams in the Victory Bracket played at the adjacent Memorial Coliseum.
Roach beat three defenders for a decisive dunk that gave Texas a 42-29 lead and the Longhorns led 43-31 at the break.
It was the fifth meeting between the teams and Duke has won all of them.
Duke: Bagley is the first Duke freshman to have five double-doubles over his first seven games.
Texas: Kemba Hepa, a senior power forward at Portland's Jefferson High School, committed to Texas this past week. The four-star recruit also considered Gonzaga.
AGAINST No. 1: Texas had faced a No. 1-ranked opponent nine previous times, with a 0-9 record. The most recent meeting was on Feb. 29, 2016, when the Longhorns lost 86-56 to No. 1 Kansas.
Duke faces the winner of Friday's late game between No. 17 Gonzaga and No. 7 Florida.
Texas plays the loser of Florida-Gonzaga.