DALLAS — Dennis Smith Jr. and Yogi Ferrell helped set the pace for the Dallas Mavericks in their 114-99 win over the Orlando Magic on Tuesday night.

It started with rebounding.

The 6-foot Ferrell led the team with eight boards, the 6-3 Smith had seven and the Mavericks used that spark to get offence going the other way.

"Me and Yogi run (after rebounding)," Smith said. "We find each other on the break pretty well, and when we can get into the paint it opens up the floor for everybody."

Ferrell said it was a result of the rest of the team boxing out, and he just benefited by grabbing the ball.

"Those guys do the hard part. We do the easy part and get boards," Ferrell said. "When we do that it gets our break started a lot quicker."

It also led to a balanced scoring output for Dallas.

Dirk Nowitzki and Smith each scored 20 points as the Mavericks stopped a three-game slide. Wesley Matthews had 16 points for Dallas, which got its first win since Dec. 31 against Oklahoma City.

Harrison Barnes and Ferrell scored 15 apiece, while J.J. Barea had 12 assists and eight points.

"Yogi came in and really changed the game," Mavericks coach Rick Carlisle said. "His impact on the offensive and defensive ends — his energy was great. In the first half, he was the one guy who was really battling on the boards for us, the shortest guy out there."

Carlisle earned his 708th career win, moving past John MacLeod for 17th in NBA history. Next up is Gene Shue with 784.

Aaron Gordon scored 19 points for Orlando, which has lost five in a row. D.J. Augustin had 18 points, and Marreese Speights finished with 13 points and 10 rebounds.

The Magic have allowed at least 100 points in four of their last five games and have lost 14 of 15.

"They've just got to do better," coach Frank Vogel said. "We've got to figure that out."

The Magic led 48-43 at halftime, but Nowitzki and Smith helped the Mavericks rally with 15 points apiece in the second half.

With his team leading 66-64 and 4:04 remaining in the third quarter, Ferrell made a pull-up jumper and Barnes followed with another jump shot. The Mavs carried an 82-75 lead into the fourth.

"We didn't stick with the same energy that we had in the first half," Augustin said. "We didn't come out and execute like we were supposed to, like we did in the first half, and it kind of fell apart at the end."

The Magic pulled within four in the final period before the Mavericks closed the game with a 14-3 run over the final four minutes.

Dallas shot 51.8 per cent from the floor. Orlando shot 45.6 per cent and had 13 turnovers in a sloppy offensive performance.

OFF THE BENCH

Gordon didn't start after he violated team rules. Vogel didn't elaborate on what rule, but Gordon indicated it had to do with being late to a team function.

"Obviously, it hurts. I want to be on the floor as much as I can and starting," Gordon said. "I understand that time management is crucial. Being punctual is part of character. Having a high character leads into winning. It's the little things that matter, so I understand why they did it."

THE LOGO

Nowitzki went 7 for 7 from the free throw line and is tied with Jerry West for the sixth-most free throws in NBA history at 7,160. Michael Jordan ranks fifth with 7,327.

TIP-INS

Magic: F Wes Iwundu and C Kehm Birch were recalled from the G League.

Mavericks: Dallas has not lost a season series to Orlando since 1997-98. The final scheduled meeting between the teams is April 4 in Orlando.

UP NEXT

Magic: Visit the Milwaukee Bucks on Wednesday.

Mavericks: Visit the Charlotte Hornets on Wednesday.

___

More AP NBA: https://apnews.com/tag/NBAbasketball