Updated

On Saturday morning, the Trail Blazers added a play designed for Monta Ellis.

It worked to perfection Saturday night.

Ellis drained 21-foot jumper with no time left on the clock and Dallas snapped the Portland's four-game winning streak with a 108-106 victory. The game-winner came on an inbounds pass from Jose Calderon.

"Calderon, we were walking out, we made eye contact and I told him, 'Give me the ball, I'm ready for it,'" Ellis said. "He gave it to me and I came off and hit the shot."

Ellis finished with 22 points and Dirk Nowitzki had 28, along with a season-high seven assists, for the Mavericks' third straight win.

Damian Lillard had a season-high 32 points for the Blazers, including a 3-pointer with 1.9 seconds left that tied it at 106.

It was just the second loss at home this season for the red-hot Blazers (17-4), who lead the Western Conference and are off to their best start since the 1990-91 season.

"It's all a part of it," Lillard said. "Sometimes you just lose games."

Lillard's 3-pointer closed Portland within 89-91 and he added another to tie it with 3:58 left. But Nowitzki made two jumpers to keep the Blazers from taking the lead.

The Blazers tied it again after Robin Lopez's hook shot and Nicolas Batum's free throws. But again Nowitzki answered with a 3-point play. After Batum's short jumper, Ellis made a 3-pointer from the corner to give Dallas a 104-100 lead with 1:40 left. He added a fadeaway with 45.9 to go.

Batum made a falling-down 3-pointer to pull the Blazers within 106-103 before Lillard's 3 tied it.

"With the players they had on the court — you've got Vince Carter who can get his shot, you've got Dirk Nowitzki who can get his shot, you've got Ellis who can get his shot — it's hard to predict what they're going to do," Blazers head coach Terry Stotts said. "We just wanted to stay as tight as we could."

But in the end, it was Ellis, who was acquired by the Mavs as a free agent in the offseason. He said the play was just put in Saturday and "came in handy."

"At that point of the game, you always like to have the confidence to take that last shot, and I got it," he said. "And I have the ability to make those shots. Coach gave me the ball and I knocked the shot down."

Batum finished with 22 points for the Blazers, who were coming off a 130-98 rout of the Utah Jazz on Friday night. LaMarcus Aldridge added 19 points and 13 rebounds for his 11th double-double this season.

The Mavs (13-8) were coming off a 100-97 victory at New Orleans on Wednesday.

"It's a great win for us," Nowitzki said. "We knew they were coming off a back-to-back. They were hot last night so it was a good opportunity for us. We made the best out of it."

DeJuan Blair's layup gave the Mavs an early 22-16 lead, but Aldridge dunked to even it at 28 late in the first half, and Dorell Wright's layup put Portland in front. The Blazers held on to a slim advantage until late in the half, when Calderon's layup and Shawn Marion's dunk pulled Dallas into a 55-51 lead for a 55-53 advantage at the half.

The Mavericks took a 67-61 lead on Nowitzki's 3-pointer, then extended it on consecutive baskets from Blair.

Portland responded with a 10-0 run capped by Batum's 3-pointer and dunk to tie it at 71. Calderon's layup snapped the run and Dallas took a 79-76 lead into the final quarter.

Gal Mekel's 3-pointer gave Dallas an 85-78 lead with 8:40 left.

Portland trailed 89-80 but charged back with consecutive baskets from Lillard and Aldridge. After Vince Carter's layup, Lillard hit on a jumper that was countered by Bernard James' layup for Dallas to make it 93-86.

Lopez finished with 14 points and 14 rebounds for his eighth double-double of the season.

NOTES: Blazers head coach Terry Stotts was an assistant to Mavs coach Rick Carlisle before coming to Portland. ... Mavericks assistant coach Kaleb Canales was a former Portland assistant and served as interim head coach of the Blazers at the end of the 2011-12 season before Stotts was hired. ... It was Portland's first loss on a back-to-back. ... There were 18 lead changes in the game. ...