BOSTON — LeBron James scored a season-high 41 points, and the Cleveland Cavaliers rallied from a 19-point deficit to beat the Boston Celtics 122-121 on Friday night.

James made one of two free throws with 36 seconds left to give Cleveland that one-point lead. The Celtics then lost the ball out of bounds, but Kyrie Irving missed a layup and Avery Bradley rebounded for Boston, which called timeout with 7 seconds to go.

But the Celtics couldn’t get a shot off as Rajon Rondo, who finished with 16 assists, lost control of his dribble near the top of the key just before the final buzzer sounded.

Irving had 27 points and Kevin Love added 12 points and 15 rebounds for the Cavaliers, who earned their third straight win.

Kelly Olynyk led Boston with a season-high 21 points, and Jared Sullinger and Jeff Green had 19 apiece.

Boston grabbed a 103-84 lead on Tyler Zeller’s layup early in the fourth quarter.

Then Irving took charge, scoring 13 of Cleveland’s next 15 points and cutting the margin to 107-99 with 8:40 left.

James led the Cavaliers in the last six minutes of the quarter with 10 points. His three-point play put them ahead 120-118 with 1:11 remaining before Love added a free throw.

Boston then tied the game at 121 on one free throw by Sullinger and two by Green.

Coming into the day, Cleveland had allowed the sixth-highest average points in the NBA, while Boston gave up the fourth most.

The first half ended with the score tied at 59. Neither team led by more than three points in the last eight minutes.

The Celtics made 16 of 22 shots in the third. They went on a 12-point run, with James on the bench for the last 10 of them, to take a 96-80 lead with 57 seconds left.