PORTLAND, Ore. (AP) Coach Mark Few had no idea what to expect from No. 17 Gonzaga when his team arrived here and knowing the kind of competition the Bulldogs could end up facing.

Based off the results, it could be one wild ride for the Zags.

"We feel like we should have went 3-0 in this thing, but we also think we represented ourselves great," Few said. "We competed at the highest level. I walk out of here knowing we can play with anybody in the country now and we did not know that coming in."

Rui Hachimura came off the bench to score a career-high 20 points, Josh Perkins added 15 points and Gonzaga blew a 21-point second half lead before putting away Texas 76-71 in overtime in a consolation game Sunday at the PK80 Invitational.

It was the conclusion of a roller coaster three games for the Bulldogs. They overwhelmed Ohio State in the opener. They played an epic double-overtime game against Florida in the semifinals, falling 111-105.

And less than 36 hours after losing to the Gators, the Bulldogs (5-1) used a 24-0 first-half run to take control and needed every bit of the lead they built to hold off a charge by Texas in the closing minutes.

"Forty-four of the minutes was pretty good. I'm going to choose to focus on that," Few said.

The season could end up being just as wild for the Longhorns. Two days after nearly knocking off No. 1 Duke before caving down the stretch, Texas staged a gutty rally in the closing minutes, forcing overtime when Dylan Osetkowski intercepted Perkins' careless pass to half court with six seconds remaining, finding Andrew Jones on the wing and watching Jones drill a 3-pointer to pull the Longhorns even at 67-all and force overtime.

But Texas had three turnovers in overtime, the last of which Silas Melson picked off, leading to a transition layup with 10 seconds left that finally put away the Longhorns.

Matt Coleman led the Longhorns (4-2) with 19 points and Jones finished with 18 points.

"I think there were really four parts to that game that were really unique to each other. I think two were really good and two of them were not," Texas coach Shaka Smart said.

Melson also hit a key 3-pointer with one minute left in regulation as the shot clock expired and Gonzaga was melting down. The Bulldogs held on despite committing 14 turnovers in the second half.

But the Bulldogs were brilliant in the first half, turning a 16-8 deficit into a 32-16 lead by scoring 24 consecutive points. Perkins was the catalyst with three of his five 3-pointers during the run. Killian Tillie and Johnathan Williams both finished with 10 points. The Bulldogs held on despite shooting 33 percent in the second half.

FINAL RALLY

Gonzaga couldn't have expected it would need every bit of that run to hold on. The Bulldogs led 54-33 with 14:08 remaining and scored 13 points the rest of regulation. The Bulldogs went nearly seven minutes without a basket but still led by 11 after Killian Tillie's 3 with 3:20 remaining.

It was gone in a blink. Coleman and Mo Bamba both scored on layups in the final 40 seconds. Bamba's layup with six seconds left allowed Texas to press and forced Perkins' careless pass to midcourt that Osetkowski intercepted and led to Jones' tying 3-pointer.

Texas outscored Gonzaga 15-4 in the final three minutes of regulation, pulling off the type of rally Duke put on the Longhorns in the semifinals on Friday.

THE TAKEAWAY

Gonzaga: The Bulldogs were fortunate to get the contributions they did from Hachimura. He'd never scored more than 12 points but was so good it didn't matter that Williams, Gonzaga's leading scorer, had more turnovers (5) than points (4) in the first 30 minutes. Hachimura was 7 of 14 shooting and added nine rebounds. "That's the Rui I know, a confident guy, funny on the court," Perkins said.

Texas: The Longhorns were hampered by long stretches of being unable to shoot. Texas had spurts in each half where it missed eight consecutive shots, part of the reason the Longhorns shot 39 percent for the game.

UP NEXT

Gonzaga: The Bulldogs host Incarnate Word on Wednesday.

Texas: The Longhorns host Florida A&M on Wednesday.

---

More AP college basketball: http://collegebasketball.ap.org and http://www.twitter.com/AP-Top25