Dirk Nowitzki moved past Shaquille O'Neal into sixth place on the NBA's career scoring list, then made the go-ahead basket with 19.2 seconds left in overtime in the Dallas Mavericks' 119-118 victory over the Nets on Wednesday night.
J.J. Barea had a career-high 32 points and added a season-best 11 assists for the Mavericks. Nowitzki scored 22 points, giving him 22,609 in his career, and Wesley Matthews finished with 17.
Thaddeus Young had a season-best 29 points for the Nets.
The Mavericks led by 16 in the first half, trailed by 11 in the fourth quarter, and the game went to OT when Young followed Barea's three-point play with a 3-pointer to tie it at 108, then blocked Barea's shot on the final possession.
Matthews then hit two 3-pointers and Barea added one in the OT, but the ball went inside the arc to the big German with Dallas down by one. After his basket, Jarrett Jack missed a jumper on Brooklyn's final possession.
Nowitzki came in needing 10 points to pass the 28,596 O'Neal scored in a career that could be capped with him being inducted into the Naismith Memorial Basketball Hall of Fame next year.
Nowitzki is sure to get there someday, too, whenever he ends a career that saw him redefine the power forward position, and perhaps create the notion of a stretch-4 that teams now crave.
He moved ahead of O'Neal with one of his high-arching jumpers from the corner with 9:51 left in the second quarter, when just about everything the Mavs threw up went in. Dallas started 20 for 25, and Barea made his first eight shots and didn't miss until shooting an airball with the shot clock running out late in the period.
The Nets then made 12 of their first 14 shots of the third to surge into the lead and had a 92-81 advantage in the fourth that it couldn't hold in its fifth straight home loss.
Point guard Deron Williams was sidelined with a strained hamstring, sitting out what would have been his first game back in Brooklyn after the Nets bought out the final two seasons of his $98.5 contract during the summer.
Mavericks: Nowitzki is eighth on the combined NBA-ABA scoring list, behind No. 6 Julius Erving and No. 7 Moses Malone. Devin Harris, another former Nets point guard, remained out with a strained right hamstring.
Nets: On Tuesday, Russian billionaire Mikhail Prokhorov's company signed an agreement to purchase full ownership of the Nets and Barclays Center. He had acquired 80 percent of the team and 45 percent of the arena from developer Bruce Ratner in 2010. The transaction is expected to be completed by early 2016. ... Backup point guard Shane Larkin returned after missing four games with a concussion and had seven points.
Williams said he understood why fans might have booed him had he played.
"I think the way I played was disappointing for fans. When you're given a max deal and you don't perform to it, especially in New York, you're going to hear it, and so I understand," Williams said. "I wish things were different, I wish it would have worked out differently but I can't control that and I just move forward."
The road team has won eight of the last nine meetings.
Mavericks: Host Chicago on Saturday.
Nets: Host Washington on Saturday.