No. 18 Alabama outlasted No. 1 North Carolina in a four-overtime thriller on Sunday to finish in third place in the Phil Knight Invitational tournament, 103-101.

Mark Sears had 24 points, five rebounds and five assists for the Crimson Tide as Javon Quinerly added 21 points to knock out the top-ranked team. It was the first time Alabama had beaten a top-ranked team since upsetting Stanford in the 2004 NCAA Tournament.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Mark Sears in the first half

North Carolina forward Leaky Black, left, defends against Alabama guard Mark Sears, right, during the first half of an NCAA college basketball game in the Phil Knight Invitational on Sunday, Nov. 27, 2022, in Portland, Oregon. (AP Photo/Rick Bowmer)

"I was losing track of how many overtimes we were in there at the end," Alabama’s Nate Oats said after the game. "A lot of credit to our guys. I thought they showed a lot of character when we could have folded."

Charles Bediako added 14 points for Alabama, including giving the Crimson Tide the lead for good with a layup with 26 seconds remaining in the final overtime.

MARCH MADNESS HERO DOUG EDERT INVOLVED IN SLAP FIGHT WITH SYRACUSE PLAYER

Jahvon Quinerly drives to the basket

North Carolina guard R.J. Davis, #4, fouls Alabama guard Jahvon Quinerly during the first half of an NCAA college basketball game in the Phil Knight Invitational on Sunday, Nov. 27, 2022, in Portland, Oregon. (AP Photo/Rick Bowmer)

North Carolina guard Caleb Love led the way for the Tar Heels with 34 points, nine rebounds, four assists and three steals. Armando Bacot had 20 points and 10 rebounds, while R.J. Davis added 19 points and nine rebounds.

"At the end of the day, Alabama made one more play than we did," North Carolina coach Hubert Davis said. "I walked in the locker room and a number of the guys had their head down, and I told them to pick their head up. I’m just as disappointed (as the players) in terms of the final outcome, but I couldn’t be any more proud about the way they competed."

RJ Davis goes up for the lay up

North Carolina guard R.J. Davis, #4, goes to the basket as Alabama forward Brandon Miller, #24, defends during the first half of an NCAA college basketball game in the Phil Knight Invitational on Sunday, Nov. 27, 2022, in Portland, Oregon. (AP Photo/Rick Bowmer)

CLICK HERE TO GET THE FOX NEWS APP

It was the second four-overtime game in North Carolina history. The other came in a victory over Tulane in 1976.

The Associated Press contributed to this report.