Jayson Tatum scored 25 points, and Grayson Allen provided an emotional lift Thursday during a second-half comeback as fifth-seeded Duke beat fourth-seeded Louisville, 81-77, at Barclays Center to set up a semifinal match with North Carolina in the Atlantic Coast Conference tournament.

The fifth-seeded Blue Devils (25-8) will play No. 1 seed North Carolina on Friday night for the third time this season.

Deng Adel scored 21 points for fourth-seeded Louisville (24-8), which led by 12 with 13 minutes left but struggled from the free-throw (15 for 26) and 3-point lines (4 for 21). Still, the Cardinals had a chance to tie it late, but Quentin Snider missed a shot with 4 seconds left.

Allen scored 18 points, and the A.C.C. scoring leader Luke Kennard added 24 for Duke.

North Carolina (27-6) advanced by cruising past Miami, 78-53, behind 19 points from Isaiah Hicks had 19 points. The Tar Heels (27-6) also got 12 points from the A.C.C. player of the year Justin Jackson.