Ivory Latta scored 19 points and hit the go-ahead three-pointer Saturday to help fourth-ranked North Carolina avoid an upset with a 64-57 win over Miami in the Atlantic Coast Conference tournament quarterfinals.

Nikita Bell added 13 points and eight rebounds for the top-seeded Tar Heels (25-3), who trailed most of the way before making a late run to reach Sunday’s semifinals.

Tamara James had 13 points and 14 rebounds for the ninth-seeded Hurricanes (13-16), who led by as many as 10 points in the first half and held a three-point edge with two minutes to play.

The Tar Heels-the top seed for the first time in eight years-have high hopes of winning their first tournament title since 1998. But they very nearly saw those dreams end abruptly against a team they beat by 31 points in the regular season.

Miami advanced to the quarterfinals with a 60-58 win over Georgia Tech, when James caught a half court heave and banked in a shot at the buzzer. Despite playing that tough game only 24 hours earlier, the Hurricanes showed so signs of fatigue early and jumped to the lead.

Their zone defense shut down Erlana Larkins and the Tar Heels’ inside game, though North Carolina certainly didn’t help itself with 10 turnovers in the first eight minutes.

The Tar Heels also missed their first 10 shots, going without a field goal for the game’s first seven minutes. James and Miami took advantage, taking a 16-6 lead on a 3-pointer from Katie Hayek midway through the half.