COLUMBIA, S.C. -- Arkansas coach Mike Anderson wasn't comfortable up 20 points and wasn't worried down 11. He knew the best Razorback team in nearly two decades had the poise to pull this game out.
No. 18 Arkansas (24-6, 13-4 Southeastern Conference) beat South Carolina 78-74 on Thursday night by scoring 18 of the final 21 points of a wild game.
The win clinches second place in the SEC for the Razorbacks, who came into the league in 1992 as an elite team, but have spent plenty of time since in the basketball wilderness. The 24 wins this season are the most since 1996-97.
"We want to play for championships," Anderson said. "I just see a lot of improvement each and every year."
And the Razorbacks looked in the first half like a team that could win titles, making 17 of their first 24 shots to take a 43-23 lead about 14 minutes into the game. But Arkansas suddenly relaxed and a South Carolina team that is improving as the season closes would outscore them by 31 points over the next 20 minutes.
"We get some leads, and it seems our defense gives up and starts playing offense," Anderson said.
The offense and defense returned just in time.
South Carolina (14-15, 5-12) led 71-60 with 6 minutes left. But the Gamecocks would score only three points in their final eight possessions, hampered further when leading scorer Tyrone Johnson cramped up and left the game for good with 2:29 to go. The team's only senior finished with 18 points on senior night.
Arkansas scored on six of its next eight possessions, with Anthlon Bell hitting two 3-pointers and a putback. Michael Qualls' jumper in the paint with 1:26 to go gave the Razorbacks the lead for good at 74-73.
Bobby Portis blocked South Carolina's attempt to regain the lead, then got an offensive rebound and putback with 16 seconds to go to put Arkansas up three.
Portis, the SEC's second-leading scorer, had 24 points and eight rebounds. Qualls finished with 18 points and seven rebounds and Rashad Madden had nine points, nine assists and seven rebounds for the Razorbacks.
South Carolina managed only one point after Johnson left the game. Coach Frank Martin said missed chances are the story of his third season with the program. Unless the Gamecocks can win two more games it will be the third losing season of Martin's eight-year career.
"We put ourselves game after game after game in a place to win," Martin said. "Those last 4 minutes are always an adventure."
The Gamecocks can finish no better than 11th in the SEC and will have to play on the opening day of the five-day conference tournament, just like they have in each of the three years since the league expanded to 14 teams.
Notice scored 16 points and Michael Carrera added 14 for South Carolina.
By finishing second in the SEC, the Razorbacks can avoid No. 1 Kentucky until the finals of the SEC tournament. The Razorbacks have won eight of their last nine, with the loss a 17-point defeat at the Wildcats.
Anderson said it didn't matter to him how the bracket plays out because if the goal is to win championships, his teams better be ready to beat anyone.
"We're going to play whoever is next," Anderson said.
Two teammates had to carry Johnson off the court because his leg cramped so badly. But the real agony came over the next 2:29 as he watched a three-point lead become a four-point defeat from the bench.
"I gave everything I've got. It didn't end the way I wanted it to end," Johnson said. "It's hard to end my last game like that, just watching."
Arkansas: The last Arkansas team to win more than 24 games was in 1994-95, when the Razorbacks went 32-7 and lost to UCLA in the national title game ... The Razorbacks have won 29 straight games when leading at the half. ... Thursday's victory was Arkansas' first in seven games at South Carolina's Colonial Life Arena.
South Carolina: The Gamecocks have to win at least two more games to avoid their sixth straight losing season. ... South Carolina has not won more than five SEC games since 2010. ... Arkansas' 78 points were the most by an SEC team against the Gamecocks this season.
Arkansas finishes the regular season against LSU on Saturday.
South Carolina wraps up the regular season at Tennessee on Saturday.