CHAPEL HILL, N.C. -- Harrison Barnes hadn't cracked double figures for two straight games while North Carolina's performances ranged from flat to disinterested against overmatched opponents.

On Wednesday night, against a team that had beaten them the past two years, the Tar Heels (No. 6 ESPN/USA Today, No. 5 AP) displayed the talented, fast-paced and -- most importantly -- focused form that everyone expected this season.

Barnes scored a season-high 26 points to help North Carolina beat Texas 82-63 for its fifth straight win. The Tar Heels (11-2) avenged last season's last-second loss to the Longhorns in their last major nonconference game before opening Atlantic Coast Conference play against Boston College on Jan. 7.

"We usually have lapses and things of that nature," said John Henson, who added 14 points for UNC. "We had a few, but if we can play at that type of level all season, I think we'll be fine."

It was a much sharper performance compared to Monday night's 50-point win against Nicholls State. The Tar Heels showed just enough spark in the second half of that one to talk coach Roy Williams out of an early morning practice the next day, while Williams said he didn't have his team ready to play.

The Tar Heels were ready this time. They went on a 13-1 run to build a double-digit lead midway through the first half and never looked back, turning a 39-23 halftime lead into a 24-point margin late in the game.

"We were more aggressive, we were alert, we didn't miss 27 free throws or whatever it was," Williams said. "I think we were better in every phase of the game, and I expected that."

Barnes was coming off two nine-point performances on 4-for-12 shooting each time. But the sophomore looked far more active and assertive against the Longhorns by attacking the rim or posting up on shorter defenders. He made 9 of 15 shots and finished with 10 rebounds, part of UNC's 49-34 advantage on the glass.

Williams even told Barnes before the game that he'd "be great."

"Just by him saying that, it just kind of reassured me of what I needed to do," Barnes said.

The Longhorns (9-3) had beaten North Carolina in each of the previous two Decembers. Last year, Cory Joseph hit a turnaround jumper with 1.4 seconds left to help Texas win 78-76 in Greensboro, about an hour west of Chapel Hill. Two years ago, the Longhorns won 103-90 in Cowboys Stadium.

In fact, Texas had won the past four meetings dating to 1995, including a 78-75 win over the Tar Heels in the second round of the 2004 NCAA tournament to end Williams' first season with his alma mater.

The game also marked the return of Texas coach Rick Barnes, a North Carolina native who rankled fans in the Smith Center during four visits as Clemson's head coach from 1995-98.

But there just wasn't the same kind of spice from those days, which included Barnes jokingly threatening to shed his suit jacket and enter the game because he had just four players left late in an incredibly physical matchup in 1998. Instead, there was only North Carolina running off a flurry of highlight-reel plays to take control.

First came freshman P.J. Hairston bowling over Julien Lewis for an emphatic one-handed transition slam that knocked Lewis to the court and sent the home crowd into a roar. Hairston missed the free throw, but Henson stuffed home a missed stickback from Tyler Zeller.

On the next possession, Henson tapped a pass-ahead from Kendall Marshall in traffic to Reggie Bullock for a layup for a 30-16 lead with about 5 minutes left before halftime. The Longhorns got no closer than 13 points the rest of the night.

"The very first play of the game, we talked about for two days what we wanted to run, and we don't run it," Rick Barnes said. "... We're not playing with a purpose on the offensive end. Really, they don't need help. At the start of the game, we gave them plenty of help to get out in the open court. It really fuels what they do."

J'Covan Brown was one of three players with 16 points for Texas, which shot 35 percent. The Tar Heels had more offensive rebounds (22) than the Longhorns had on the defensive end (17), a stat noted by Rick Barnes afterward as "a major problem."

The Longhorns had won seven straight and were holding teams to an average of 54 points and 33 percent shooting during that stretch. They had also outrebounded opponents by nearly 17 per game in the past four before falling flat Wednesday night.

"We just have to play harder," said freshman Myck Kabongo, who had just one point and played only 15 minutes. "The only thing I can take from this is that we've got to play harder."