Anthony Davis delivered 23 points, 13 rebounds, 10 assists and a season-high seven blocks as the Dallas Mavericks routed the short-handed Toronto Raptors 124-102 on Friday night.

The victory at American Airlines Center ended a three-game losing streak for Dallas, which improved to 39-42 ahead of Wednesday’s Western Conference play-in matchup against Sacramento.

The Raptors, who fell to 30-51, dressed only eight players and played seven, resting RJ Barrett and Immanuel Quickley with one game left in their season.

Dallas broke the game open in the second quarter with a 16-0 run and outscored Toronto 31-13 in the period, taking a 66-38 lead into halftime.

The Mavericks shot 65% in the second quarter while the Raptors managed just 19.4% and went 0-of-9 from three-point range during the frame.

Dereck Lively II added 10 points and 11 rebounds on 5-of-7 shooting while P.J. Washington chipped in with 14 points and eight boards.

Dallas also got a major lift from its bench, with Max Christie and Brandon Williams each scoring 17 points.

Williams, who signed a multi-year deal Thursday after his two-way contract expired March 29, shot 7-of-8 and added three assists.

The Mavericks led by as many as 38 in the second half before emptying the bench.

Toronto’s Scottie Barnes scored a team-high 26 points along with nine rebounds and three assists in 30 minutes.

Ochai Agbaji hit a career-high six threes and totaled 24 points, including 17 in the opening quarter to match the team’s highest scoring period by a player this season.

However, outside of Barnes and Agbaji, the remaining Raptors shot a combined 3-of-31 in the first half.

Jamal Shead added nine points and five assists while A.J. Lawson and Garrett Temple had 12 points apiece for Toronto.

The Raptors finished with a 40% field goal percentage and committed 10 turnovers, while the Mavericks shot 55.1% and registered 34 assists.

Klay Thompson had seven points and two assists in 18 minutes for Dallas, which played without Kyrie Irving due to injury.