Mahinmi scored a career-high 19 points, Nowitzki contributed 18, and the reigning NBA champion Mavericks rallied for their first victory of the season, 99-86 over the Toronto Raptors on Friday night.
Jason Terry added 10 of his 17 points in the final quarter for the Mavericks (1-3), who hadn't started 0-4 since the 2006-07 season.
The last defending NBA champs to open a season at 0-4 were the 1969-70 Boston Celtics.
The Mavs didn't have long to dwell on the disappointment of Thursday night's 104-102 loss at Oklahoma City on Kevin Durant's 3-pointer at the buzzer.
"We knew it would happen, it was just a matter of time," Terry said. "We thought it would happen last night, but unfortunately we had to take a bump along the way. But the way we played last night gave us some confidence. Now that we know how we have to play, we're a confident team."
Dallas has five new faces on the roster after losing five key players from a team that won its first title last season.
Mahinmi hit all six field goal attempts, went 7 for 11 from the free throw line, and added five rebounds and two blocked shots.
"I know this was a career high in points for him, but the last two nights he's given us a really high level of energy," Mavs coach Rick Carlisle said. "He's given us a physical presence, he's a combative guy, and he was really big for us tonight."
Toronto used a 17-2 run in the third quarter, completed by Amir Johnson's follow dunk, for a 68-61 lead.
But Dallas finished the quarter with a 16-2 spurt, capped by Vince Carter's three free throws, for a 77-70 edge heading into the fourth quarter.
"We've got to understand how to win to beat a championship team," Casey said. "We worked hard to get a 68-61 lead, and then we've got to learn how to close it out. And that's the mark of a young team versus a veteran team."
Toronto never got closer than five points the rest of the way.
"The key part of the game was that 16-2 run," Carlisle said. "That gave us a huge lift."
The Mavericks carried a 29-23 lead into the second quarter, riding a 17-6 rebounding advantage in the opening 12 minutes.
Dallas got off to a better defensive start, a point of emphasis by Carlisle. The Mavs had allowed 32, 32 and 28 points in the first quarter of their three games.
The Mavericks went on to lead by as many as 12 in the second quarter.
But Bargnani scored 13 of his 18 first-half points in the period, and Toronto's late 12-0 run narrowed the halftime gap to 50-46.
After opening the season with blowout home losses to Miami and Denver, the Mavs seem back on track.
"We're playing better basketball," Carlisle said. "The first couple of games were horrible. The last couple of games are games we can build on."
Mahinmi's previous career high was 17 points at Memphis on Jan. 15, 2011. ... Trade pickup Lamar Odom continues to struggle for the Mavs, finishing with three points and four rebounds in 12 minutes. ... The teams met for the only time this season. ...Dallas has won 11 of 12 at home against Toronto. ...Nowitzki had converted 22 straight free throws before a miss in the opening quarter. ... G Jerryd Bayless twisted his left ankle with 9:14 left in the second quarter. Bayless attempted to run, but was playing on one leg and limped to the locker room 6 seconds later, done for the night. X-rays were negative and he left the arena in a walking boot. ... Players from Penn State and Houston were in the crowd. The teams meet Jan. 2 in the TicketCity Bowl in Dallas.
The NBA draft is tonight (7 p.m. ET, ESPN/WatchESPN) and trade talk is picking up. Chad Ford dishes his latest intel on how the draft will go and which teams will make deals.
The latest notes, updates and analysis on the Hawks from around the web.
The latest notes, updates and analysis on the Lakers from around the web.