Tyler Zeller scored 22 points, John Henson had 17 points and 12 rebounds, and No. 5 North Carolina rallied from a nine-point deficit in the second half to squeeze past Maryland 83-74 Saturday.

The Tar Heels (20-3, 7-1 Atlantic Coast Conference) got all they could handle from the upstart Terrapins, who didn't lead over the final nine minutes but never let North Carolina get comfortable down the stretch.

UNC star Harrison Barnes, who sprained his left ankle Tuesday against Wake Forest, scored 18 points on 5-for-15 shooting. He started slowly but was instrumental after Zeller picked up his fourth foul with 11:44 to go.

Henson scored 12 points over the final 10:12. His basket on a goaltending call against Alex Len with 2:04 left put the Tar Heels up 74-69.

Kendall Marshall contributed 16 assists, helping North Carolina to its fifth straight win and 14th in 15 games.

Terrell Stoglin scored 20 for Maryland (13-9, 3-5). It marked the first time that Terrapins coach Mark Turgeon faced his former mentor at Kansas, Carolina coach Roy Williams.

Turgeon nearly guided his team to a sensational upset. Instead, he had to settle for an encouraging showing because the Terrapins made only one field goal over the final three minutes.

Maryland opened the second half with an 8-2 run — four points apiece by Sean Mosley and Stoglin — to take a 48-39 lead. That meant North Carolina would have to mount its biggest rally of the season to win, topping the comeback from an eight-point deficit at Virginia Tech.

The Tar Heels wasted no time getting to it. A layup by Zeller and a 3-pointer by Marshall sparked an 11-2 run that tied it at 50 with 12:40 left. Minutes later, however, Zeller picked up his fourth foul and had to hit the bench.

It didn't harm North Carolina. The Terrapins led 57-52 before Barnes sandwiched a 15-foot jumper and a 3-pointer around a dunk by Henson to put the Tar Heels in front.

Zeller scored 14 points in the first half, but Maryland committed only four turnovers in taking a 40-37 lead — only the fourth time this season the Tar Heels trailed at halftime.

North Carolina got only two first-half points from its bench — a basket by James Michael McAdoo.

The Tar Heels temporarily blunted the enthusiasm of the sellout crowd by moving ahead 15-9 before Nick Faust scored five points in an 8-0 run that put the Terrapins in front. Barnes ended the surge with an alley-oop dunk, then drilled a 3-pointer to put the Tar Heels up 20-19.

Maryland led 29-24 before Zeller made a layup, McAdoo hit a jumper and Henson sank a free throw to knot the score.