Boston Celtics guard Isaiah Thomas (4) drives against Orlando Magic guard Mario Hezonja, left, and forward Aaron Gordon, right, in the first quarter of an NBA basketball game, Friday, March 31, 2017, in Boston. (AP Photo/Elise Amendola)
Boston Celtics guard Isaiah Thomas (4) drives against Orlando Magic guard Mario Hezonja, left, and forward Aaron Gordon, right, in the first quarter of an NBA basketball game, Friday, March 31, 2017, in Boston. (AP Photo/Elise Amendola) Credit: Elise Amendola

Boston — Isaiah Thomas scored 35 points, Jae Crowder had 18 and the Boston Celtics rallied to beat the Orlando Magic, 117-116, on Friday night to maintain their slim lead over Cleveland atop the Eastern Conference.

Boston’s Al Horford made two free throws with 1:22 left for a one-point lead, and then Orlando missed three shots down the stretch, including a driving layup attempt by Elfrid Payton with two seconds left.

The Celtics (49-27) entered with a half-game lead over the Cavaliers, who won easily against Philadelphia to preserve that margin.

Horford and Jaylen Brown each scored 12 points, and Boston won for the fifth time in six games.

Aaron Gordon scored 20 of his 32 points in the first half and had 16 rebounds, while Evan Fournier scored 20 points for the Magic. Payton dished out a career-high 15 assists and flirted with a triple-double, getting 12 points and nine rebounds.

Terrence Ross had 17 points and Jodie Meeks contributed 13 off the bench for Orlando, which has lost three in a row and eight of its last 11. The Magic have dropped 13 straight against the Celtics in Boston.

Raptors 111, Pacers 100

Toronto — DeMar DeRozan scored 40 points and Toronto rolled to its seventh straight home win over Indiana.

DeRozan was 11 of 26 from the floor to register his 30th game of 30 points or more this season, tying Vince Carter’s 2000-01 franchise mark. It was also DeRozan’s sixth 40-point game of the season.

Jonas Valanciunas had 16 points and 17 rebounds for his team-leading 28th double-double, while Serge Ibaka added 15 points and 12 rebounds.

Hornets 122, Nuggets 114

Charlotte, n.c. — Kemba Walker had 31 points, and Marco Belinelli and Frank Kaminsky took over in the fourth quarter as Charlotte preserved its slim playoff hopes by beating Denver.

The Hornets shot 17-for-26 on 3-pointers, including 7-for-12 in the fourth quarter.

Cavaliers 122, Sixers 105

Cleveland — LeBron James scored 34 points, Kyrie Irving dropped 24 and Cleveland ended a turbulent and troublesome March with an easy win over injury-weakened Philadelphia.

James made 14 of 22 shots in 30 minutes as the Cavs ended a three-game losing streak and won for just the third time in eight games to end the month 7-10.

Pelicans 117, Kings 89

New Orleans — DeMarcus Cousins had 37 points and 13 rebounds in his first game against the Kings, and New Orleans routed Sacramento.

Cousins had downplayed his first meeting with the team that drafted him in 2010 and traded him away this February, but his play looked inspired.

He tied a career-high with five 3-pointers and executed a tricky, crowd-pleasing, cross-court bounce pass during a fast break.

Anthony Davis added 19 points, 12 rebounds and five blocks for the Pelicans, who led by as many as 32 en route to their eighth victory in 11 games.

Pelicans first-round draft choice Buddy Hield, who was part of the Cousins trade, had 13 points for Sacramento, while Ben McLemore had 15 points.