BOSTON — Isaiah Thomas just missed becoming the first Celtics player to score 40 points in three straight games, firing home 21 of his 38 in the fourth quarter as Boston extended its winning to six with a 113-107 victory over the Los Angeles Lakers on Friday night.

The game ended less than an hour after the Toronto Raptors lost in Orlando, clinching Brad Stevens’ spot as the Eastern Conference All-Star coach.

Cleveland coach Tyronn Lue owns the best record in the conference but coached in the game last year and now Stevens and his Boston staff are going to New Orleans.

Thomas, the league leader in fourth-quarter scoring (10.5 per game coming in), scored his 37th and 38th points with 2:25 left but didn’t take another shot. He was 6 of 9 from the floor in the fourth quarter and went 7 of 7 from the foul line in the game, making him 46 of 47 in the last four games.

Jae Crowder added 18 points and six rebounds, rookie Jaylen Brown had 12 points and seven boards, Al Horford posted 11 points, eight rebounds and eight assists, and Marcus Smart came off the bench with nine points, seven assists, five steals and three rebounds.

Lou Williams led the Lakers, who lost their 11th straight road game, with 21 points, including 13 in the fourth quarter. D’Angelo Russell had 20 points, six rebounds and six assists, and Larry Nance Jr. matched his career high with 18 points, Nick Young had 17 points and Brandon Ingram 14.

The Lakers, losers of five of their last six, fell to 5-23 on the road in the second game of a five-game trip.

The Celtics scored the game’s first seven points in a 1:03 span, but the Lakers, thanks to four 3-pointers, used a 21-10 run to lead by four. The lead was up to five, but a Terry Rozier trey at the buzzer cut it to one at the end of 12 minutes.

Boston, down one, used a 7-0 spurt to take the first-half lead for good and then finished the half with six in a row for an 11-point halftime lead.

NOTES: Celtics G Avery Bradley missed his ninth straight game with a sore Achilles and F Kelly Olynyk returned after missing a game with a shoulder injury. “We’re still progressing at a conservative rate,” Celtics coach Brad Stevens said of Bradley. … Stevens, on the teams coming into the game with 3,252 wins apiece all-time: “It’s unbelievable. I think it’s a unique enough rivalry that 100 years from now it will probably be tied again. They’ve got a bright future ahead and I like their young talent. They’re a scary team to play against.” … The Celtics provided a handout on the tie — saying the probability of the teams having the same number of wins is 1 in 8,292. … The Lakers continue their road trip at the Knicks on Monday night, and the Celtics host Paul Pierce, Doc Rivers and the Los Angeles Clippers on Sunday. Pierce, who will sign a one-day contract and then retire as a Celtic before his No. 34 goes up in the rafters, is making his final appearance as a player.