North Carolina coach Roy Williams talks to his players during the No. 2 Terps’ 89-81 loss to the No. 9 Tar Heels at Dean Dome on Dec. 1, 2015.

When the final buzzer sounded Tuesday night, North Carolina coach Roy Williams began his customary walk toward the opposing bench with a heavy heart.

The Tar Heels had just beaten the No. 2 team in the nation, but Williams wasn’t in a celebratory mood. He hurt for his counterpart, Terps coach Mark Turgeon. At Kansas, Turgeon worked under Williams for four years and the two men became friends.

So heading into the top-10 matchup Tuesday, neither coach was thrilled that they were facing each other. Turgeon was pleased that the Terps would get an early-season test in a hostile environment, but he wished he wouldn’t have to face an old mentor.

READ MORE: Dean Dome atmosphere will be best Maryland experiences

While Tuesday’s game was thrilling, the result was bittersweet for both coaches. Turgeon fell to 0-8 against North Carolina, and Williams had to reconcile his pride for the win with the disappointment he felt for a buddy.

“It’s a lose-lose for us,” Williams said.

The matchup between the two friends and coaches was a regular affair before the Terps jumped to the Big Ten. In Turgeon’s first three seasons at this university, the programs faced off seven times.

Williams and Turgeon met at Kansas, as Turgeon was already a part of the Jayhawks’ staff when Williams took over the program in 1988. Williams decided to retain Turgeon, a former Jayhawks point guard.

The duo helped guide Kansas to three NCAA tournament appearances and a runner-up finish. Along the way, they formed a bond, as Williams mentored his young assistant.

After the 1991-92 season, Turgeon took a job at Oregon, but the pair remained close. They hugged before Tuesday’s game.

“The only thing I don’t like is I used to work for Roy Williams,” Turgeon said of the game Monday. “Don’t like going against coaches and people you care about greatly, so that’s the only thing that’s difficult about it.”

When Turgeon took the Terps job in 2011, the team struggled. Williams knew it took a toll on his former assistant. But Turgeon turned it around last year and guided the Terps to their first NCAA tournament appearance in five years.

And while the Terps lost Tuesday, Williams said his former pupil has the program headed in the right direction.

“Turgeon is one of my favorite people in the world,” Williams said. “He does a great job with his club.”