Cooper Flagg became the youngest player in NBA history to reach 50 points, finishing with 51, yet the Dallas Mavericks lost 138-127 to the Orlando Magic at the American Airlines Center on Friday.

Wendell Carter Jr. led Orlando with 28 points and six rebounds, while Desmond Bane added 27 to keep the Magic within striking distance of the eighth seed in the Eastern Conference. Jalen Suggs and Tristan da Silva contributed 19 points each, and Franz Wagner scored 18.

Dallas suffered their 14th straight home loss, a streak that marks the longest at the 25-year-old American Airlines Center. Brandon Williams scored 23 points for the Mavericks, while P.J. Washington Jr. missed a third consecutive game with an illness.

The fourth quarter erupted into chaos when coach Jason Kidd and Naji Marshall were ejected within seconds of each other, with Flagg receiving a technical foul in the same sequence. Flagg responded with 24 points in the quarter, hitting a corner 3-pointer and finishing with a bucket and free throw to reach 50 points before leaving to a standing ovation.

Flagg shot 19 of 30 from the field, including 6 of 9 from three-point range, and converted all seven free throws. Max Christie added 14 points for Dallas, but the team could not match Orlando’s depth and balanced scoring.

Orlando improved to 41-36, remaining half a game behind Charlotte for the eighth playoff spot and securing a play-in berth with a chance at automatic playoff entry. Dallas fell to 24-53 and will host the Los Angeles Lakers on Sunday, while the Magic travel to New Orleans.