DALLAS (AP) Dirk Nowitzki and Deron Williams played on Sunday as if everything was on the line.
Nowitzki scored 40 points and Williams had 31 points and 16 assists, all season highs, leading the Dallas Mavericks to a 132-120 overtime win over the Portland Trail Blazers.
Williams made a tiebreaking 3-pointer in overtime before Nowitzki scored eight straight points, all on assists by Williams.
''It's my job as a point guard,'' Williams said. ''You've got to know when your good fella's hot.''
The Mavericks moved within a half-game of the Trail Blazers for the sixth playoff position in the Western Conference. Dallas has 12 games to play, and Portland 11.
The Mavericks (35-35) also gained a tiebreaker by winning the first two of three games in the season series against the Trail Blazers (36-35). The teams play again in Portland on Wednesday.
''This was the tiebreaker game,'' Williams said. ''We gained a full game on them, and we see them again next week.''
Williams said he needed to be more aggressive offensively because Chandler Parsons, averaging nearly 14 points per game, was out with a sore right hamstring.
Nowitzki took notice.
''(Williams) set it all up. His aggressiveness, him taking guys off the dribble, using a great rhythm today,'' Nowitzki said. ''Salah (Mejri) really changed the game for us today, so I think this game has a couple heroes.''
Rookie Mejri came off the bench to score 13 points with career highs of 14 rebounds, six blocked shots and 32 minutes played. He had played just 198 minutes in 23 games before Sunday.
''Everything's in play,'' Dallas coach Rick Carlisle said. ''We're a team that needs all of our pieces.
''We needed some size out there. I just thought Mejri has had some good stretches for us, maybe he can give us some rim protection, some rebounding, and he came in and made a big difference.''
Damian Lillard's layup had tied it at 113 for Portland with 30 seconds remaining in the fourth quarter. Mejri missed two free throws, and Lillard missed a 3-point attempt before time expired.
Lillard led the Trail Blazers with 26 points, but made only 8 of 26 field goal attempts.
''I shot a shot that I'm really comfortable shooting and it just didn't go in,'' Lillard said. ''I was kind of disappointed I couldn't end the game right there. Going into overtime on the road against a pretty good team is tough.''
Allen Crabbe scored 24 points, and C.J. McCollum had 22. Miles Plumlee had 14 points and a career-high 19 rebounds.
For Dallas, Wesley Matthews scored 15 points, all on 3-pointers, and Raymond Felton had 11.
Nowitzki has scored 20 or more points in eight straight games. His 20th career 40-point game was his first since Jan. 11, 2014, and the first by a 37-year-old since Karl Malone in 2000-01.
''Never underestimate greatness at any age,'' Carlisle said.
Williams' previous season high was 30 points on Dec. 1 at Portland. He was the first Maverick with 30 points and 15 assists in the same game since Jason Kidd had 33 and 16 (along with 12 rebounds) in 1996.
WHAT'S THE SCORE?
For 1 1/2 minutes down the stretch, the scoreboard showed Portland with 108 points instead of 109. Officials later changed Allen Crabbe's field goal with 3:19 left from two points to three.
''We had seen the replay, so we knew that we had one more point,'' Trail Blazers coach Terry Stotts said, ''and that it was a tie game.''
Mejri said he didn't gain confidence from Sunday's game.
''I think I get my confidence a long time ago, when I blocked Kevin Durant and (Russell) Westbrook in one night,'' he said. ''I don't need my confidence. I need the coach's confidence.''
Trail Blazers: In the first quarter, Portland made 14 of 23 field goal attempts (61 percent), including 6 of 12 3-pointers. In the second, the Blazers shot 5 for 23 (22 percent).
Mavericks: Nowitzki played his 1,329th NBA game, moving into a tie for 13th place with Moses Malone. ... Six of Williams' 16 assists went to Nowitzki.
Trail Blazers: Host Dallas on Wednesday night.
Mavericks: Play at Portland on Wednesday night.