The San Antonio Spurs secured a win over the Golden State Warriors, inflicting a first home defeat of the season on the Pacific Division side.
Klay Thompson, who missed the previous game with a hand injury, kept the Warriors in contention, but was unable to reduce the gap late on.
The Thunder made a bright start, but OJ Mayo led the Bucks to a lead from the bench, giving Milwaukee their first back-to-back wins since March 2013.
The hosts were 18 points down at the end of the first quarter, but Dirk Nowitzki found his rhythm to lead the Mavericks back into the game.
The German finished the game with 23 points, moving him above Hakeem Olajuwon to become the highest-scoring NBA player born outside of the United States.
The Canadian side were 11 points down heading into the last 12 minutes, but Kyle Lowry and Terrence Ross led them back into the tie, before the latter prevented Tobias Harris making a late shot that would have given Orlando hope.
Gary Neal thought that he had sent the game into overtime with a last-second effort, but a review revealed that the ball did not leave his hand in time, handing the win to Portland.
Results in full: Orlando Magic 100-104 Toronto Raptors, Los Angeles Lakers 102-107 Memphis Grizzlies, Oklahoma City Thunder 78-85 Milwaukee Bucks, Sacramento Kings 98-106 Dallas Mavericks, Charlotte Hornets 100-102 Portland Trail Blazers, San Antonio Spurs 113-100 Golden State Warriors