Updated

DALLAS (AP) Harrison Barnes scored 31 points, including eight in overtime, and the Dallas Mavericks rallied from a 21-point deficit to beat the Utah Jazz 112-105 on Thursday night.

Barnes' three-point play ended an 11-0 run that began late in regulation and put Dallas ahead 107-100. Devin Harris scored the first four points of OT.

Utah's Gordon Hayward scored a season-high 36 points, but missed a 3-point attempt from the left corner as regulation ended.

The Mavericks scored the final four points of regulation, on a dunk by Barnes and a rebound basket from the edge of the foul line by Dirk Nowitzki with 3 seconds remaining.

Nowitzki finished with 20 points. Utah's Rudy Gobert scored 15 points and added 15 rebounds before fouling out with 22 seconds left in the fourth quarter.