NASHVILLE, Tenn. — All kinds of thoughts swirled through Riley LaChance’s mind after an official reviewed a replay of his game-winning shot.

LaChance swished a 3-pointer from the top of the key with .5 seconds left, giving Vanderbilt an 81-80 win over Mississippi State on Wednesday night.

LaChance’s teammates mobbed him near half-court before an official checked to make sure his left foot wasn’t on the 3-point arc and that time hadn’t expired.

“I had every thought going through my head,” LaChance said. “Was I behind the line? Did I get it off in time? How much time is going to be left? I’m just happy it worked out.”

The senior guard felt confident he was behind the arc, but not all his teammates were convinced.

Mississippi State forward Abdul Ado dunks the ball against Vanderbilt in the first half of an NCAA college basketball game Wednesday, Feb. 14, 2018, in Nashville, Tenn. (Mark Humphrey/Associated Press)

“Some people on the bench were saying it might not have been (a 3),” LaChance said. “(The defender) kind of bumped me a little bit from the back so I had to take a step forward a little bit.”

Xavian Stapleton hit 1 of 2 foul shots to give Mississippi State (18-8, 6-7 Southeastern Conference) an 80-78 lead with six seconds left.

Jeff Roberson scored 22 points and grabbed 11 rebounds for his eighth double-double this season and sophomore Payton Willis made a career-high five 3-pointers, leading Vanderbilt (10-16, 4-9) to its fourth straight home win.

“We’ve been on the other side of that so many times this year,” Commodores coach Bryce Drew said. “It was really nice to be on the winning side. That’s a shot that (Riley) will be showing his kids one day.”

Drew said Vanderbilt had several options on its final play before LaChance made a great read.

LaChance and Joe Toye both scored 16 points for the Commodores, who went 14 of 27 from 3-point range.

Willis added 15 points for Vanderbilt, which won at home for the seventh time in nine games.

Mississippi State rallied from an 11-point deficit to take a 72-71 lead on Stapleton’s 3-pointer with 3:53 left.

The Bulldogs, who haven’t won at Memorial Gym since 2012, fell to 1-7 on the road.

“The last play of the game was obviously very frustrating because we left the ball open and (LaChance) made an uncontested 3,” Bulldogs coach Ben Howland said. “We had four guys back on the shot, but mistakes are made.”

Mississippi State hit 10 of 17 from 3-point range. The Bulldogs made 58.5 percent of their shots from the floor and the Commodores made 50 percent.

The loss to last-place Vanderbilt hurt Mississippi State, a bubble team, in its quest for its first NCAA Tournament appearance since 2009.

Stapleton led the Bulldogs with 18 points and Abdul Ado added 15. Tyson Carter scored 12, Aric Holman had 11 and Nick Weatherspoon added 10.

Powered by a 13-0 run midway through the first half, Vanderbilt took a 40-31 halftime lead.

The Commodores avenged an 80-62 loss to the Bulldogs on Jan. 16 in Vanderbilt’s first game after losing Matthew Fisher-Davis to a shoulder injury.

BIG PICTURE

Mississippi State: The Bulldogs lost in overtime at Missouri on Saturday before Wednesday’s last-second loss.

Vanderbilt: The Commodores are a different team at home, but they are winless at 0-9 on the road this season.

HIGHLIGHT-REEL PLAY

Vanderbilt’s Joe Toye made a highlight-reel play with a tomahawk jam on Holman that gave the Commodores a 66-58 lead with 7:01 left. Toye showed “no regard for human life” tweeted one man watching the game. “That was a heck of a play,” LaChance said. “Hopefully, we’ll see it on SportsCenter later tonight. That was huge for us.”

MOMENT OF SILENCE

Vanderbilt held a moment of silence before the game in support of the victims of Wednesday’s mass shooting in South Florida.

BY THE NUMBERS

Mississippi State shot 66.7 percent from the floor in the second half as it made 18 of 27 shots, including 8 of 12 from 3-point range. . Vanderbilt got plenty of second-shot opportunities with 13 offensive rebounds. . LaChance and Mississippi State’s Lamar Peters both had eight assists.

UP NEXT

Mississippi State hosts Ole Miss (11-15) on Saturday.

Vanderbilt hosts Florida on Saturday.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.