The Dallas Mavericks got just their fourth victory of the season on Wednesday night, and they did it in dramatic fashion, beating the Memphis Grizzlies, 95-94.

Down by 17 points to start the second half, the Mavericks used a huge third quarter to get back in the game. And with just over a minute remaining, they seemed to have taken control, going up by five points thanks to a Dennis Smith Jr. dunk. The craziness, however, was just beginning.

With just under 30 seconds to play, Marc Gasol drilled a 3-pointer to tie the game at 92-92. 

Then after Smith Jr. missed a jumper with less than 10 seconds to play, Tyreke Evans took off towards the other end of the floor. He threw up a fading runner off the glass that just rimmed out, but JaMychal Green was right there to slam home the finish. 

Initially, it was waived off on the floor for basket interference. But after a lengthy review, the refs said the ball was out of the cylinder, and the basket was good, giving the Grizzlies a 94-92 lead. 

With just 0.5 seconds to play, it seemed victory was in hand. Harrison Barnes, however, had other ideas. The Mavericks' swingman took a pass well out behind the 3-point line, and immediately put up a prayer. 

Ball game. 

Barnes' shot was reviewed, but it was determined he just got it off in time, and the Mavericks were indeed victorious.