DALLAS -- J.J. Barea has fresh memories of San Antonio scoring the final 13 points in a recent Dallas loss, and Atlanta getting the last five with the score tied in the Mavericks' most recent game.
The diminutive guard was happy to have a key role in a different ending for the last-place team in the Western Conference.
Barea scored 20 points, including a clinching layup in the final seconds, and the Mavericks ended another six-game winning streak by the Toronto Raptors with a 98-93 victory on Tuesday night.
The Mavericks held DeMar DeRozan and the Raptors to season lows in shooting percentage as Toronto lost for just the second time in 14 games, with each loss coming after six straight wins.
"I was thinking about our problems closing out, last three minutes, I was like, [hoping] it doesn't happen again," said Barea, who tied the team high with four assists. "Something we've got to learn. We've got to do a better job of getting some important buckets at the end."
Dirk Nowitzki scored 18 points and fellow German Maxi Kleber had 15 points and matched his rookie season bests with five blocks and eight rebounds. Harrison Barnes had 16 points and 10 boards.
Kyle Lowry led Toronto with 23 points but didn't score in the fourth quarter, while DeRozan couldn't get going at all after averaging 37 points on a three-game road winning streak that ended.
Hounded by Dallas defensive specialist Wesley Matthews most of the game, DeRozan scored eight points while shooting 19 percent (3 of 16). His previous low was 20 percent (1 of 5) in his only other single-digit game this season -- two points in a 112-78 win at Atlanta in November.
"A lot of shots I took that were in the paint, normally shots that I make," said DeRozan, who averaged 32 points during the most recent six-game winning streak. "Missed a lot of floaters, easy things. One of them nights."
The teams combined to make just five of 31 shots in the final 8 minutes -- including two misses by Serge Ibaka with the Raptors trailing by three before Barea hit a layup with 10 seconds left after dribbling out most of the shot clock.
The Raptors (23-9) came into the game with the best winning percentage in the Eastern Conference but shot under 40 percent for the first time this season.
Jonas Valanciunas had 17 points and 11 rebounds for Toronto, and Ibaka added 12 points and 12 boards.
Raptors: G/F C.J. Miles, a former Dallas Skyline player, hit a 3 in 10 minutes after missing three games because of a dental procedure.
Mavericks: Nowitzki, in his 20th season, has at least 18 points in five of the past seven games after scoring that many just twice in his first 28 games. ... Barnes tied his career high with his sixth double-double.
The other German
Kleber, also from Nowitzki's hometown of Wurzburg, Germany, matched Barnes for the team high with 13 points in the first half. It was capped by an alley-oop dunk when Yogi Ferrell grabbed a defensive rebound with 6 seconds left, raced the length of the court and tossed it to Kleber for the slam with a couple of seconds to spare.
Kleber (four blocks) and Nowitzki (three) combined for seven blocks in the first half. It was already a season high for Nowitzki, and Kleber matched his season best early in the third quarter. The Mavericks had a season-high 11 blocks.