Updated

Dirk Nowitzki became the highest-scoring NBA player born outside the U.S. and the Dallas Mavericks rallied from 24 points down to beat the Sacramento Kings 106-98 on Tuesday night.

Monta Ellis scored 10 of his 16 points in the third quarter, including a fadeaway 3-pointer at the buzzer after the Mavericks had taken their first lead in their 21st straight regular-season win at home against Sacramento.

Nowitzki passed Hakeem Olajuwon for ninth place on the all-time scoring list. The 7-foot German finished with 23 for 26,953 career points, seven more than the Nigerian-born former star of the Houston Rockets.

Rudy Gay scored 26 to lead the Kings, who were outscored 58-28 from the middle of the second quarter to the end of the third.

Chandler Parsons, who was 2 of 20 from the field the previous two games, scored eight points in a little more than a minute to get the Mavericks within five in the third, and Ellis put them in front for the first time on a layup for a 69-67 lead.

Parsons finished with 19 points and was 5 of 11 from 3-point range after missing all 11 from beyond the arc in the previous three games. Tyson Chandler had his third straight double-double with 14 points and 11 rebounds.

Nowitzki passed Olajuwon with a jumper from just inside the 3-point line early in the fourth quarter.

Ramon Sessions scored 18 points for the Kings, and DeMarcus Cousins had 16 points, 11 rebounds and five assists.

Sacramento looked poised to win a regular-season game in Dallas for the first time since Feb. 27, 2003. Instead, the Kings dropped their second straight after a 5-1 start.

The Kings held Dallas to 14 points on 24 percent shooting in the first quarter and led 44-20 early in the second. But they went cold in the third, shooting 26 percent and getting outscored 30-15.

Ben McLemore hit all three of his 3-pointers in the first quarter, when the Kings outscored Dallas 32-14. But he made just one of five from long range the rest of the way as Sacramento ended up shooting 44 percent overall.

The Kings also had 19 turnovers over the final three quarters, and Gay had a game-high seven.

TIP-INS

Kings: They have a playoff win in Dallas since their last regular-season win. Sacramento won 94-92 in Game 4 of the first round in 2004 on the way to a 4-1 series victory. ... Darren Collison, who lost the job as the starting point guard his only season in Dallas when the Mavericks' 12-year playoff streak ended in 2012-13, didn't get to play against his former team because of a shoulder injury.

Mavericks: Dallas matched the third-biggest comeback in franchise history. It's the third time the Mavericks have come back from 24 down. ... The 21-game streak against Sacramento is the longest against one team in Dallas franchise history.

UP NEXT:

Kings: Finish four-game road trip at Memphis on Thursday.

Mavericks: Host Philadelphia on Thursday.