DALLAS — Zach Randolph made a high-arching 17-footer with 0.3 seconds left, lifting the Memphis Grizzlies to a 104-103 victory over the Dallas Mavericks on Sunday night.

The Grizzlies erased an 18-point deficit shortly before halftime, then polished off the comeback with a wild finish.

Memphis went ahead with 14.3 seconds left when Shane Battier caught a blocked shot under the basket and flicked in a reverse layup. Then Dallas — which had won eight straight and 19 of 19 — went back ahead when Dirk Nowitzki made a jumper over Battier from the foul line with 3.1 seconds left.

The Grizzlies beat the Mavericks for the third time this season, winning the season series against their conference rival for the first time in franchise history.