Gordon Hayward on Tuesday capped a perfect night from inside the arc with the biggest basket of the game.

Hayward tied a career high with 39 points, making all 16 of his two-point attempts, as the Boston Celtics won their fifth straight game by holding off the Cleveland Cavaliers 119-113.

Hayward hit 17 of 20 shots, including one three-pointer. He put in Kemba Walker’s miss with 22 seconds left to give Boston a five-point lead. Walker stole the inbounds pass and sank a free throw to put the game away.

The only person in the building who was not impressed with his perfection on two-pointers was Hayward.

“It seems like a pointless stat to me,” Hayward said. “Tonight just felt sweet because we got the win, but I wish we could have closed out better.”

Celtics coach Brad Stevens took a different point of view.

“Certainly, you always felt like he could get a bucket at any time,” Stevens said. “He was aggressive going to the basket. He did a good job when guarded by big guys. He did a good job when guarded by small guys.”

Walker had 25 points for Boston, who have not lost since the season opener against Philadelphia.

“That’s pretty impressive,” Walker said of Hayward’s stat line. “He made all his twos and only missed three threes. That’s nuts.”

Hayward scored 16 points in the opening quarter and 22 in the first half, hitting all nine attempts from the field.

Cavaliers forward Larry Nance Jr had a simple assessment of the performance.

“He didn’t miss,” Nance said. “He’s crafty. He plays the game at a very cerebral level.”

Hayward suffered a horrific leg injury in Cleveland in the opening minutes of the 2017-2018 season opener. He averaged 16.5 points in two games at Cleveland last season.

“I don’t think about it,” Hayward said. “I haven’t thought about it for a while. Hopefully, you guys won’t be asking about it again.”

Collin Sexton, who scored 21 points, hit a trey with 1 minute, 33 seconds to play that cut Boston’s lead to 116-113. The score remained that way until Hayward’s crucial basket after his offensive rebound.

“Probably a case, I don’t know what the film’s going to show, ball-watching,” Cavaliers forward Kevin Love said. “I’d gone for the rebound and he just crashed weak side.”

Boston were 48 of 85 from the field (56 percent). Jayson Tatum scored 18 points and Carson Edwards had 13.

Tristan Thompson had 19 points and 13 rebounds for Cleveland, who have lost three straight. Love scored 17 and Nance 15.

In other results, it was:

‧ Hornets 122, Pacers 120, OT

‧ Lakers 118, Bulls 112

‧ Hawks 108, Spurs 100

‧ Thunder 102, Magic 94

‧ Nuggets 109, Heat 89