MEMPHIS, Tenn. -- Harris Barnes' buzzer-beating 3-pointer gave the Dallas Mavericks a 95-94 victory over the Memphis Grizzlies on Wednesday night at FedExForum.

After blowing a 17-point halftime lead the Grizzlies rallied in the fourth quarter, taking a 94-92 lead with 0.5 seconds left on a put-back dunk by forward JaMychal Green (eight points, nine rebounds). But Barnes, who led the Mavericks with 22 points and nine rebounds, got off the game-winning shot as soon as he caught it and when the shot went down it sent Memphis to its sixth straight defeat.

The Mavericks (4-15) have won half their games at the expense of the Grizzlies (7-10). Memphis has not won at FedExForum since Oct. 28 against Houston.

Dallas trailed 56-39 halftime, but took a 72-70 lead with 47 seconds left in the third quarter on a driving layup from guard Devin Harris (11 points, four steals.). The Mavericks had a 74-72 lead to start the fourth quarter and led by as many as seven points in the quarter.

Guard Tyreke Evans paced Memphis with 18 points, nine rebounds and seven assists (six turnovers) off the bench. Center Marc Gasol finished with 14 points, 10 rebounds and four assists and rookie center Deyonta Davis had a career-high 14 points and seven rebounds off the bench.

The Mavericks shot 42.9 percent from the floor and went 9 of 28 from 3-point range for 32.1 percent. Memphis shot 45.7 percent from the field while going 7 of 29 from distance for 24.1 percent.

Guard Dennis Smith Jr. gave Dallas 17 points and forward Dirk Nowitzki finished with 13 points and eight rebounds.

Memphis got 13 points from rookie Dillon Brooks and 11 points from forward Chandler Parsons.

NOTES: The Mavericks and Grizzlies entered Wednesday's game with the same record in their previous 10 games: 2-8. ... F Dirk Nowitzki now has 1,225 career blocks and needs 26 to pass Shawn Bradley (1,250) for first-place on the Mavericks' all-time list. ... Memphis G Tyreke Evans has seven games of 20 or more points off the bench this season and leads the NBA in points scored as a reserve. ... Asked the best way to handle losing a key player during the season, Dallas coach Rick Carlisle said: "You do what (the Grizzlies) are doing and throw it to (Marc) Gasol every time, and let him dictate the game. Look, there are no other Mike Conleys walking around on the street." Conley is out indefinitely with a left Achilles injury.