Coming off back-to-back losses that threatened to spiral their season, with some tough opponents on the horizon, Coach Jason Kidd’s Dallas Mavericks needed a star performance from one of their two stars on Thursday night to right the ship.

They got just that from both players. Luka Doncic scored 42 points and Kyrie Irving added 40 as the Mavericks took down one of the hottest teams in the league, the Philadelphia 76ers 133-126 at American Airlines Center. The win pushed the Mavs back from the brink of .500 to 33-31 for the season.

“This is a big win for us after those last two [losses],” Coach Kidd said. “Luka and Ky were great on both ends of the floor. Offensively, both having 40…those guys set the tone from the first quarter. Those guys were trying to lead their team to victory. Those two, working together, at a high level against a very good team.”

Both players had it going from the outset, combining for 27 points in the opening frame, and Dallas needed them as Philadelphia’s dynamic duo of Joel Embiid and James Harden combined for 26 and Dallas held a one-point lead, 38-37 after one.

“They set the tone, not just finding each other, but playing off of one another, their gravity, being able to find their teammates,” Coach Kidd said.

Philadelphia shot a scorching 10-of-16 from the field in the second quarter, but the Mavs defense forced five turnovers and, thanks to another 10 points from Irving, outscored Philly 33-30 in the second to take a four-point halftime lead.

The Mavs spread the ball around in the third, with Doncic scoring 10, Irving, Maxi Kleber and Reggie Bullock all chipping in nine. Bullock went three-for-three from deep in the third, and two of the three came off assists from Irving. All told, the Mavs made 25 threes on the evening.

“I thought Reggie, there in the second half with the wide open threes, was big for us,” J-Kidd said.

The red-hot shooting in the third— Dallas was 65 percent from the field and 64.5 percent from three —allowed the Mavs to take a 19-point lead into the fourth. Philly charged hard in the fourth, pulling within five points in the final minute, but Doncic and Irving did enough to hold them off and secure one of Dallas’ biggest wins of the season.