Joel Embiid scored a season-high 38 points and grabbed 13 rebounds as the Philadelphia 76ers ended the Boston Celtics perfect home record with a 115-109 win on Thursday.

Embiid had a clutch block and drained five of six free throws all within the final 26 seconds as the Sixers withstood a late Boston charge. He also scored 16 points in the final quarter. Tobias Harris added 23 points, eight rebounds and seven assists as Mike Scott scored 15 on five three-pointers as the 76ers won their eighth game in the last nine contests.

The Celtics had won 10 straight to start the season and coming into the game were one of just three undefeated teams at home. Philadelphia and Miami are the undefeated teams left.

Kemba Walker had 29 points, and Enes Kanter with 20 and Daniel Theis with 16 powered the offence of the Celtics, who have lost two games in as many nights.

The Celtics trailed by nine points with 2:25 left in the fourth before mounting a charge. They cut the Sixers lead to 108-106 on a Kanter dunk with 41 seconds to go. Ben Simmons hit a pair of free throws, but a Jayson Tatum drained a three pointer cut the Celtics deficit to one, 110-109, with 27 seconds left.

Embiid was fouled and made one of two free throws then added two more free throws to clinch the victory. Boston led late in the first half 55-47 but Philadelphia went on a 9-4 run to cut the deficit to three points 59-56 at halftime.

Former Celtic Al Horford sat out the game with a left knee and hamstring injury. He received a standing ovation when he was shown on the scoreboard, and he acknowledged the crowd with a wave. Horford spent three seasons with Boston before signing with Philadelphia as a free agent.

Elsewhere, Luka Doncic delivered his second career 40 point triple double as the Dallas Mavericks rolled over the Detroit Pistons 122-111 in Mexico City.

The 20-year-old Doncic dazzled the crowd of 20,060 at the Arena Ciudad de Mexico with 41 points, 12 rebounds and 11 assists to become the first NBA player under the age of 21 with two career 40-point triple doubles. LeBron James had one.

The second year Maverick also registered his fourth career 40 point game.

Mexico gets G League team

Mexico basketball fans got more good news Thursday when the NBA announced the NBA G League will add a franchise from Mexico next year making it the first team from outside the United States and Canada in the minor development league.

NBA commissioner Adam Silver made the announcement prior to the start of the Mavericks game.

Doncic’s triple-double was also the 16th of his career, with his 41 points coming up one shy of his personal record in a triple-double, which he set last month against San Antonio.

Doncic had eight of his points during a 4:44 stretch bridging the second and third quarters in which the Mavericks turned a 58-51 deficit into a 71-58 lead.

Dallas, who won their sixth straight, led by as many as 24 points in the third quarter before cruising the rest of the way.