The Milwaukee Bucks, in the running for a lottery draft pick instead a playoff spot, wanted the upset.
None of that kept the Mavericks from winning their 60th game, 105-103 to match their franchise record Wednesday night.
"To talk about 60 is pretty impressive, especially the way we started," coach Avery Johnson said. "These types of games, we could easily lose, but they refuse to lose."
It is the third time the Mavericks have won 60 games, all in the last five seasons. The top team in the Western Conference has 11 games left in this regular season, the one that started with four straight losses.
"We just wanted to keep it going," Devin Harris said. "We had a great road trip, but there were a lot of hurdles tonight we had to overcome."
With their star out after hurting his left ankle in the first half, Jason Terry had 27 points with a couple of key late baskets and the go-ahead free throw for the Mavericks.
Dallas not only had to overcome the absence of Nowitzki, but missed four of its six free throws in the final 30 seconds.
With the game tied at 103, Terry penetrated and was fouled and made the second free throw.
After Ersan Illyasova's second turnover in the final minute, a bad pass that led to a foul against Jerry Stackhouse with 15.5 seconds left, Stackhouse made the first of his two free throws to make it 105-103.
Instead of trying a game-winning 3-pointer, Michael Redd penetrated and missed an acrobatic shot in the lane with 3.3 seconds left. DeSagana Diop was fouled grabbing the rebound, but missed both of his free throws, allowing Mo Williams to get off a half-court shot that missed wide as the game ended.
"I just couldn't finish it up," said Redd, who didn't score any of his 34 points in the fourth quarter, when his only shot was the one at the end. "We had our chance. Dallas was coming off a back-to-back. We wanted to try to get the upset."
After Nowitzki got hurt with 3:42 left in the first half, the Bucks went on a 14-4 run to take a 62-54 halftime lead.
The Bucks were only the third team to score at least 60 against Dallas in the first half. The other times were back-to-back losses to Golden State and Phoenix earlier this month before the Mavericks' current eight-game winning streak.
Nowitzki returned only briefly after halftime before leaving for good. He was walking around after the game and described the injury as "two bone spurs jamming together." He will get treatment Thursday, when the team has a day off from practice.
"I tried to walk it off at halftime and tried to loosen it up but I couldn't go. There was no need for it to get worse so I had to take the rest of the night off," Nowitzki said. "It hurt me to watch, but we made big shots down the stretch."
The Mavs hit only one of their first 13 shots to start the fourth quarter. But Terry tied the game at 95 on a fast-break jumper with 4:38 left, and hit a 3-pointer with 2:22 left to make it 100-99.
"We had to dig real deep and have faith in each other," Terry said.
Stackhouse followed with another 3-pointer, sandwiched by a pair of short baskets by Williams that left the game tied at 103 with 1:32 left.
Stackhouse had 21 points, while Nowitzki and Josh Howard -- who tweaked his right ankle in the final 2½ minutes -- both had 17 points. Howard, like Nowitzki, will come in for treatment Thursday, but he played the rest of the game.
Nowitzki got hurt when he stepped on the foot of Milwaukee's Brian Skinner while moving under the Dallas basket. Nowitzki bent over and put his hands on his knees, then left the court and went to the locker room.
After halftime, Nowitzki moved gingerly while playing only 64 seconds. On Milwaukee's first possession to start the half, Nowitzki stumbled under the basket. He told Johnson he was OK, but the All-Star forward missed a short jumper at the other end, then came out for good.
He left one point shy of 15,000 for his career.
"I don't check stuff like that," Nowitzki said. "That's something you think about when your career is over."
- Dallas has won 32 of its last 34 at home.
- The Bucks wrap up their three-game road trip Friday in Charlotte. They have never lost against the Bobcats, going 9-0 in the series.