EAST LANSING, Mich. -- North Carolina flashed its potential again, earning another impressive victory after a second shaky setback.

J.P. Tokoto had 12 points and a career-high 10 rebounds to help the Tar Heels beat No. 1 Michigan State 79-65 Wednesday night.

North Carolina (5-2) has been talented enough to knock off the top-ranked Spartans and then-No. 3 Louisville this season, but the Tar Heels have also lost to Belmont and UAB.

"I truly believe after the Louisville win, our mentality after that was, 'Birmingham is just going to be an automatic win. Just because we're North Carolina,' " Tokoto said. "We can't have that mentality -- and kind of learned that Sunday night.

"We came here, were ready to play, intensity level was up, and we got results."

The Spartans (7-1) lost to an unranked nonconference team at home for the first time in more than a decade. They looked nothing like the team that beat then-No. 1 Kentucky a few weeks ago or the program that has had so much success over nearly two decades under coach Tom Izzo.

"One of the more disappointing performances of my career here," Izzo said. "From the jump ball, they kind of took it to us."

The Tar Heels took control from the start, never trailed and used a 12-1 run to take a 65-52 lead with 6:02 left.

"Michigan State did not want it that much more than we did," North Carolina coach Roy Williams said.

Izzo agreed.

"We looked soft," he lamented.

Marcus Paige's Tar Heels beat a No. 1 team for the first time since topping Duke on March 4, 2006. Mike Carter/USA TODAY Sports

North Carolina outrebounded the Spartans by 11, leading to 19 second-chance points. The Tar Heels turned 14 of Michigan State's turnovers into 19 points and held the Spartans to 36 percent shooting.

"We're as happy as we can possibly be -- 179 degrees away from where we were after the UAB game," Williams said.

Kennedy Meeks scored 15 points for North Carolina and Brice Johnson had 14 off the bench. Marcus Paige and Nate Britt added 13 apiece.

"You can't tell in college basketball what's going to happen," Williams said. "At one point, we had three freshmen, a sophomore and a junior on the court."

Gary Harris had 17 points and Keith Appling scored 13, but both Michigan State guards missed 10 of 15 shots. Adreian Payne had 16 points and eight rebounds for the Spartans, whose last loss at home against an unranked nonconference team was to Toledo on Dec. 30, 2002.

The Tar Heels beat a No. 1 team for the first time since March 4, 2006, at Duke, and they have a nation-high 13 wins over top-ranked teams. They've won seven straight against the Spartans, including in the 2009 NCAA final.

Tokoto has taken advantage of an expanded role while P.J. Hairston and Leslie McDonald sit out because of NCAA eligibility concerns.