It couldn’t have ended easily, because almost nothing over these past four years has. South Carolina’s Senior Night game Wednesday, which seemed destined for celebratory curtain calls in the waning minutes of a blowout win, suddenly turned, leaving the Gamecocks to hang on for a rare Southeastern Conference victory, over the league’s last-placed team.

But years from now, nobody will remember the final score of South Carolina 79, Mississippi State 72. Nobody will remember that USC led by 19 points with 5:08 left, before a 15-2 run by the Bulldogs cut it to six with 1:42 remaining. Nobody will remember how the Bulldogs never got any closer than that when the game was still truly in doubt.

What will stick from Wednesday is how the best performance of junior guard Brenton Williams’ life maybe let USC’s fans head into the offseason with some hope, even as the Gamecocks (14-16, 4-13 SEC) still must claw to avoid their fourth straight losing season.

Williams, in his second year at USC after transferring from junior college, scored 38 points while shooting 10-of-17, including 6-of-9 on 3-pointers. He made all 12 of his free throws. He surpassed his previous career high in points by 16.

It had been 26 years, to the day, since a USC player last scored 38 points — Terry Dozier against Florida State in the 1987 Metro Conference tournament.

Williams’ night seemed to come from nowhere. He has started once since the end of 2012, was averaging 10 points and had scored in double figures just twice in USC’s previous 11 games, including a matchup with Tennessee in which coach Frank Martin decided to not even play him.

But Williams’ 38 points didn’t just magically materialize. At the urging of point guard Bruce Ellington, Williams has spent more time shooting after practice recently.

“I had always gotten in the gym, but this past week I made a little bit more effort to stay just a little longer,” Williams said.

All season, Martin has preached the virtues of extra shooting for his offensive-challenged team. After Tuesday’s practice, he asked every player to make 100 jump shots and 100 free throws before they left. Everybody did. Martin said four players stayed even after that to shoot more. Williams was one of them.

“Imagine that, how that works, huh?” Martin said. “Brent, for the last eight, 10 days, something has re-clicked there. I don’t know what it’s been. Maybe I need to ask him. But his whole vibe, his enthusiasm, his aggression, his attention to detail has been better.”

What Martin liked most about his team’s offensive outburst against the Bulldogs (8-21, 3-14) wasn’t just that USC shot 45.7 percent, its second-best in an SEC game this year, but that 19 of its 21 made shots were assisted. As Martin talked to Williams in the locker room about his game of a lifetime, Martin mentioned how happy he felt with the way USC’s offense flowed.

It’s something Martin longed to see all year. Regardless of how Saturday’s regular season finale at Vanderbilt and next week’s SEC tournament unfold, Martin got what he wanted Wednesday.

“That (assist stat) says that the other four guys on the court did their jobs, the spacing was right, guys were not selfish and guys made extra passes,” Martin said. “When Brent had those cracks, he took advantage of it.”