South Carolina was initially told it had made this year's NCAA Tournament, Gamecocks athletic director Ray Tanner confirmed on Thursday.
Tanner said South Carolina was called by an NCAA official to invite the team to the tourney on Selection Sunday.
Approximately 10 minutes later, the school received another call saying it had been a mistake and that Vanderbilt had been selected.
Dan Gavitt, the NCAA vice president of men's basketball championships, apologized for the error later Thursday.
"I take full responsibility for this clerical error and apologize to Coach (Frank) Martin, his staff and team, and the entire University of South Carolina community," Gavitt said in a statement.
Gavitt said the Gamecocks were never part of the field.
"Unfortunately, during the Selection Show a junior men's basketball staff member mistakenly sent a text to a member of the University of South Carolina athletics department staff via an app we used for the first time during the 2016 tournament," Gavitt said. "The text was supposed to go to all teams, congratulating them for making the tournament. Regrettably, a text meant for another institution went to South Carolina instead.
"While the Gamecocks were given serious consideration, at no time during the selection process was South Carolina voted in to the field. Ultimately, they were one of the last four teams left out of the tournament."
The Gamecocks were 24-8 on Selection Sunday while Vanderbilt was 19-13.
South Carolina ended up playing in the NIT after being passed over for the NCAA bid.