CHAPEL HILL, N.C. (AP) — North Carolina's Hall of Fame coach and his players had spent the month of January grinding through a frustrating and confidence-jarring set of losses, brought on amid a series of injuries as well as shaky play.

Finally on Saturday, the Tar Heels could celebrate the end of uncharacteristic struggles for the tradition-rich program — for a game, anyway — and a coaching milestone for Roy Williams that took much longer than expected to achieve.

Brandon Robinson scored a career-high 29 points to help North Carolina beat Miami 94-71, ending the program's first five-game losing streak since 2003. It also allowed Williams to pass late mentor Dean Smith for fourth on the Division I men's career coaching wins list, though it came nearly a month after Williams tied Smith in a win against Yale.

“I'd have been just as happy if it happened four or five games ago,” Williams said, adding: “I desperately wanted No. 9 for this team.”

The Tar Heels (9-10, 2-6 Atlantic Coast Conference) had lost six straight league games for the first time in program history. And Williams had been emotional and despondent after recent losses in trying to find an answer.

They released weeks of pent-up frustration against a Miami team missing two of its top scorers in Chris Lykes and Kameron McGusty, using a 15-2 run to build a big early lead and turn this one into a rare romp for a struggling group.

Robinson’s return was particularly welcome. The 6-foot-5 senior didn’t play in Wednesday’s double-overtime loss at Virginia Tech due to lingering effects from a Jan. 11 car accident in which the other driver was charged with driving while impaired, though Robinson had played Jan. 18 against Pittsburgh.

“The mood in the locker room was so much better,” Robinson said. “I feel so much better just because we won, I can sleep good tonight, so I’m happy about that.”

Freshman Isaiah Wong scored a season-high 19 points for the Hurricanes (10-9, 2-7), who announced shortly before tipoff that Lykes and McGusty wouldn't play due to injuries. Running with just six players much of the way, Miami shot 41% and made 6 of 24 3-pointers.

Miami: The Hurricanes had lost five of six since the start of January. Things only got worse Saturday without top scorer Lykes (15.7 points) and No. 3 scorer McGusty (14.5). The team said before the game that Lykes was battling a groin injury, though Larranaga described the injury as an issue with a hip flexor. McGusty was out with back spasms. Both played in Tuesday's loss at Duke despite not being fully healthy and Larranaga said they hadn't practiced since.

“It just made sense to rest them and see if they can get better,” Larranaga said, “because neither one of them is close to 100%.”

UNC: The Tar Heels hadn’t won a game since the start of 2020, experiencing their first five-game skid since 2003 and their first-ever six-game ACC losing streak going back to a Dec. 8 loss at Virginia. Star freshman point guard Cole Anthony hasn’t played since as he recovers from December knee surgery and the Tar Heels also didn’t have point guard Jeremiah Francis, either. Regardless, they finally gave Williams his 880th career victory.

TIP-INS

Robinson made 11 of 16 shots and hit 6 of 10 3-pointers. ... UNC finished with a season-high scoring output while shooting 58% after failing to hit 50% all year. ... UNC had 32 assists on 40 baskets, tied for the most in Williams' 17 seasons. ... Anthony Walker had 14 points for Miami, while No. 2 scorer D.J. Vasiljevic (14.6 points) finished with eight on 3-for-13 shooting. ... Freshman Armando Bacot had 19 points, 12 rebounds and seven assists for UNC, which had a 41-21 rebounding advantage.

UP NEXT

Miami: The Hurricanes host Virginia Tech on Tuesday.

UNC: The Tar Heels visit rival North Carolina State on Monday.

___

More AP college basketball: http://apnews.com/Collegebasketball and http://www.twitter.com/AP_Top25