DALLAS (AP) Dirk Nowitzki and the Dallas Mavericks didn't have much to play for after officially wrapping up the seventh seed in the Western Conference playoffs before halftime against Phoenix.
They knocked the Suns out of postseason contention anyway.
Nowitzki scored 19 points, including the go-ahead basket and a key 3-pointer in the fourth quarter, and the Mavericks kept the Suns home from the playoffs for the fifth straight season with a 107-104 victory Wednesday night.
The Suns can finish no better than a tie with New Orleans and Oklahoma City for the final spot in the Western Conference. The Pelicans would win that tiebreaker because of a better conference record.
''We're going to keep our heads up,'' said Gerald Green, who led the Suns with a season-high 30 points. ''Obviously, it's a big disappointment, but we're going to finish out the season strong and hope we can build on this for next year.''
The Mavericks were locked into the seventh seed with the Pelicans' blowout loss at Memphis, a game that ended before the first half of a late start in Dallas. But the Mavericks didn't play like the game didn't matter, withstanding a tight match that had 14 lead changes and 16 ties.
''We are just trying to develop a mentality that we want to continue to the playoffs,'' guard Devin Harris said after the Mavericks avoided just their second losing streak of at least three games this season. ''We really want to bring this home and establish ourselves on how we want to play.''
Tyson Chandler had 12 points and 23 rebounds, two off his season high, for Dallas, which held off Phoenix by a game last season in the race for the final playoff spot in the West.
''It's been a difficult year in terms of having a lot of different guys and having a trade in the middle of the year,'' Suns coach Jeff Hornacek said. ''For the most part, these guys have been battling. Our guys are young. They're learning how to win.''
Monta Ellis had 20 points and three assists, including the pass to Nowitzki for a 3-pointer that matched Dallas' biggest lead at four, 106-102, with 22 seconds left. Nowitzki had put the Mavericks ahead 101-100 on a jumper with 3 minutes remaining.
But the big German missed a free throw to give Phoenix a chance to tie, and the Suns missed three 3-pointers in the final 11 seconds. The last, by Markieff Morris just before the buzzer, came after Phoenix stole an inbounds pass with 5 seconds remaining.
Green, who spent a season with Dallas, had 18 in the first half, when the Suns scored 63 a night after a 96-69 loss at Atlanta. That was just the third time in franchise history that they were held under 70.
Marcus Morris had 12 points and 10 rebounds, while Markieff Morris had 19 points, seven assists and six rebounds, although he was 0 of 3 from long range and had two of the three misses in the frantic final seconds.
The twins were playing the same day that police in Phoenix released documents indicating the players were being investigated on allegations of assaulting of a man who says he was close friends with them in their hometown of Philadelphia. The alleged incident occurred in February.
Rajon Rondo had 12 points and seven assists for Dallas after leaving the last game against Golden State early with a hyperextended left knee. The Mavericks were without Chandler Parsons for the second straight game because of right knee soreness. Richard Jefferson started in his place again despite a jammed toe that kept him out of practice for part of a rare three-day break.
TURNABOUT'S FAIR PLAY
After rallying from six down in the fourth quarter to beat Dallas in Phoenix last month, the Suns went up 98-95 on the last of Green's 5 3-pointers with 5 minutes left. They were still up 100-97 at the 4-minute mark but got outscored 9-2 in a stretch capped by Nowitzki's 3.
Suns: Before their current five-year playoff drought, the Suns made the playoffs 19 times in 22 seasons. ... Phoenix finished 6-12 on the second night of back-to-back games. ... The Suns were going for their first season sweep of Dallas since 1997-98, the year before Nowitzki arrived.
Mavericks: Chandler had his 30th double-double of the season. ... Charlie Villanueva scored nine points and was 3 of 6 on 3-pointers. The rest of the team was 0 of 11 from long range before Nowitzki's 3.
Suns: at New Orleans on Friday night.
Mavericks: at Denver on Friday night.