BOSTON — The Boston Celtics squandered several opportunities to put away the pesky Brooklyn Nets before Kyrie Irving ended the comebacks.

Irving scored 28 points and hit a pair of free throws with 7.7 seconds left after his teammates struggled from the line, and the Celtics held off the Nets 108-105 on Sunday.

Al Horford added 10 points, 10 rebounds and three blocks, Marcus Morris scored 15 points and Terry Rozier had 14 as Boston closed 2017 by winning three straight and four of five.

Rondae Hollis-Jefferson finished with 22 points and 12 rebounds and Caris LeVert scored 16 points for the Nets, who could not overcome 10 turnovers in the second half.

“They’re a team that’s not going to give up,” Rozier said. “They’ve got a lot of shooters, which opens up a lot for them. They use it to their advantage. That’s a tough team.”

The Celtics won their seventh straight against the Nets, although Boston didn’t have the game in hand until Irving his late free throws. Boston went the final 4:27 without a field goal and struggled from the foul line, going 16 for 25 in the game.

“We stayed poised to make a comeback,” Hollis-Jefferson said. “That’s basketball. Sometimes it goes your way, sometimes it doesn’t. But for us now, we’re definitely competing. It starts with the starting unit, we’ve got to come out that way. And I feel like the effort’s there.”

Hollis-Jefferson pulled the Nets within 103-95 on a dunk, then converted a three-point play with 2:05 left to cut the margin to 103-98. Quincy Acy hit a 3-pointer with 18 seconds left after the Nets grabbed two offensive rebounds, and the lead was down to 105-103.

Marcus Smart made 1 of 2 free throws with 15.2 seconds left, and then Irving – who went 4 for 4 from the foul line – added two more to seal it.

Acy scored 14 points for the Nets, DeMarre Carroll and Allen Crabbe contributed 12 points apiece, and Spencer Dinwiddie had 10 points and nine assists.

“Sometimes you’ll have a slip-up like we did at the beginning of the first quarter, but it’s the overall outcome that you kind of want to base it on and we kind of stayed with it,” Hollis-Jefferson said. “Give them credit. Boston’s a really good team.”

NOTES

At 30-10, the Celtics reached the 30-win mark before January for the third time in franchise history. Only the 1964-65 team, which won its 30th on Dec. 28, and the 1959-60 club (Dec. 30) reached 30 wins earlier.

Irving scored at least 20 points for the 11th straight game. … Boston shot 69.6 percent (16 for 23) in the first quarter and led 38-28.