AUSTIN, Texas (AP) Purdue's Carsen Edwards was pouring in points with shot after shot. Somebody had to match him if Texas was going to find a way to end a frustrating early-season losing streak.

Matt Coleman III delivered for the Longhorns, landing just enough late counterpunches to send the Longhorns to a 72-68 victory Sunday that snapped a three-game skid.

Coleman scored 22 points, none bigger than a late burst that scored six of Texas' final eight points and ensured the Longhorns held the slimmest of leads in the final minutes. Coleman's third 3-pointer pushed Texas to a 67-62 lead and his soft floater in the lane with 43 seconds left kept Texas ahead by four. He then made one of two free throws with 21 seconds left

"We preached this week just hoop. Don't think about it. Don't be mechanic," Coleman said. "You're playing the game you love, have fun with it ... It was just win time. Find a way."

Coleman was clearly having fun with the win. He even skipped down the court after consecutive assists on dunks by Jaxson Hayes.

"He plays with a spirit that can be covered up by worrying. Hopefully he can use this game as a learning experience," Texas coach Shaka Smart said.

Edwards tied his career high with 40 points but didn't get a chance to get off a potential winner at the end. After Coleman's missed free throw kept the Boilermakers within 70-68, the Longhorns sent two defenders at Edwards in a half-court trap, forcing him to pass the ball away.

Purdue's Aaron Wheeler then turned the ball over on the Texas baseline with five seconds left. Elijah Mitrou-Long made two free throws for the final margin.

"He (Edwards) was phenomenal all night long. We knew at some point we wanted to blitz him. That was a key possession for us," Smart said. "It forced someone else to make a play."

Texas (6-3) also found a shooting touch that has been missing most of the season. The Longhorns came in as one of the worst 3-point shooting teams in the country, but made 11 3s against the Boilermakers (6-4).

BIG PICTURE

Purdue: Edwards was exceptional in the Houston-area native's first college game back in his home state. The rest of the Boilermakers barely showed up. Purdue had a brutal day shooting the ball from long range. The Boilermakers came in having made 102 3-pointers, a clip of slightly better than 11 per game, among the best in the nation. They were 2 of 16 from behind the arc in the first half and 9 of 32 for the game.

Edwards is just the third Texas opponent to score 40 points at the Frank Erwin Center in the 41 seasons the Longhorns have played there.

"I just wanted to win, man," Edwards said. "I give all I have every game.

Texas: The Longhorns needed this win in the worst way. After dropping out of the Top 25 with losses to Radford and VCU, the Longhorns were in danger of falling into a rut they might never have climbed out of. Four Longhorns scored in double figures.

"We were on our guys. It was probably two of the more tense, combative practices that we've had (this week)," Smart said. "The thing I kept seeing there is a mental fatigue going on."

PERFECT BIG MAN

Hayes was 6-of-6 shooting from the floor with several dunks and even showed off a nifty 10-foot hook shot over Purdue's 7-foot-3 center Matt Haarms. Hayes is a raw talent who seemingly improves every game and new mid-range shot could make him particularly difficult to defend.

ROACH RETURNS

Texas got an important game from senior guard Kerwin Roach II, who had been 7-of-37 shooting since scoring 32 in a win over North Carolina on Thanksgiving. Roach scored 10 points in the first half and, perhaps most important, made 4 of 4 from the free-throw line. Smart had pushed Roach to drive to the basket instead of settling for 3-pointers. Roach also had a key assist on Coleman's late 3-pointer.

JONES GOES FOR TREATMENT

Texas guard Andrew Jones is scheduled to leave the team for several weeks for ongoing leukemia treatments. Jones was diagnosed in January 2018 and returned to the team this season. He has played a total of 11 minutes in two games but hasn't played since Texas beat The Citadel on Nov. 16.

UP NEXT

Purdue's early season grind continues when the Boilermakers play Notre Dame in Indianapolis on Dec. 15.

Texas hosts Grand Canyon on Dec. 15.

---

More AP college basketball: https://apnews.com/Collegebasketball and http://www.twitter.com/AP-Top25