TALLAHASSEE, Fla. (AP) — It ended up being a day and evening for Florida State coach Leonard Hamilton and his team to gut things out.

Hamilton had surgery to remove kidney stones Wednesday morning. Less than 12 hours later he was on the sidelines as his 24th-ranked Seminoles held on for an 81-80 victory over No. 12 North Carolina.

"I feel mission accomplished. That was the most important thing," Hamilton said. "The last 36 hours have been tough for me. I've had tougher things to overcome, maybe not as painful. This makes the pain worth it."

Florida State (12-2, 1-1 Atlantic Coast Conference) led most of the game, including the final 8:12. But the Seminoles nearly squandered it as they didn't make a field goal in the last 2:57 and missed their last four free throws.

The Tar Heels (12-3, 1-1) got within 81-80 with 30 seconds left when Joel Berry II made a 3-pointer after Theo Pinson picked off an errant pass by CJ Walker. After Phil Cofer missed both free throws, North Carolina had a chance to win. Berry drove the lane and missed a jumper which was rebounded by Terance Mann.

Mann missed his free throws with 1.7 seconds remaining, but North Carolina couldn't get a shot off, allowing Florida State to snap a seven-game losing streak to the Tar Heels.

"We just like playing with each other so much. I feel like we're able to call each other out on plays, we can get on each other and not let it affect us," said CJ Walker, who scored 18 points. "I feel like that's a big thing for our team. They made a run, but our team called each other out, said what we had to do and we executed it."

"They attacked so much more effectively. I liked our kids making a comeback," North Carolina coach Roy Williams said. "We got ourselves in position. For us we need to play better and smarter."

Braian Angola led Florida State with 20 points and Mann added 17. The Seminoles extended their home winning streak to 28, which is currently the third-longest in Division I.

Berry led the Tar Heels with 28 points, including 20 in the second half after they trailed 51-40 at halftime. Kenny Williams added 18.

"He was our offense for a long time in the second half," Williams said about Berry. "We have to get some other guys to step up. We need to get more balance and to help him out on defense since he is doing a lot on both ends."

BIG PICTURE

North Carolina: The defending national champions have been tested in their last five games, which includes two losses. It won't get any easier for the Tar Heels, whose next four games are against teams ranked in the top 75 of the RPI.

"We need to play better and smarter. We need to do a better job of not allowing teams to attack the basket," Williams said.

Florida State: The Seminoles led 92-89 last Saturday at Duke but missed their final eight shots as the Blue Devils rallied for a 100-93 win. They learned their lesson from that game by getting a couple of key rebounds in the final minute when it counted.

"In the huddle, in the last 4 minutes, we just say, 'For us to win the game, we need to rebound. And everybody has to go in there.' When you want to do it, you just do it," Angola said.

POLL IMPLICATIONS

Florida State has been locked in at 24 the past two weeks, but could move up after this win and with a good effort at Miami. The Tar Heels might need a win against Virginia on Saturday to prevent a big drop.

LETDOWN

Luke Maye came in averaging 12.3 rebounds in his last seven games, including 39 in the past three, but he was held to six boards against Florida State, which was tied for a season low.

3-POINT BARRAGE

The Seminoles have three straight games where they have made double-digit 3-pointers. They made 11 against North Carolina, including nine in the first half. They came into the game second in the ACC in 3-pointers made with 123.

UP NEXT

North Carolina: Travels to No. 8 Virginia on Saturday.

Florida State: Travels to No. 15 Miami on Saturday.

___

More AP college basketball: https://collegebasketball.ap.org and https://twitter.com/AP_Top25

___

Follow Joe Reedy on Twitter at https://twitter.com/joereedy