NEW YORK — Isaiah Thomas’ night off to rest his knee meant an opportunity for someone else to step up for the Celtics.

Jae Crowder did just that.

He scored nine of his 24 points late in the fourth quarter, Avery Bradley had 16 overall, and Boston held on to beat the Brooklyn Nets 98-95 on Friday night.

“A lot more shot opportunities,” said Crowder, who also had a season-high 12 rebounds. “Just a lot of opportunities through our offense that we don’t run for him. A lot of guys were getting a lot of looks that probably weren’t used to getting.”

The Nets had a chance to tie the game with under 6 seconds left, but Brook Lopez and Quincy Acy each missed back-to-back 3-pointers.

Al Horford added 14 points and eight rebounds for the Celtics while their All-Star point guard sat the first game of a two-game trip. Thomas, second in the NBA in scoring with 29.2 points per game, bruised his right knee in Wednesday night’s win over the Minnesota Timberwolves after a hard fall.

“I mean, obviously, Isaiah does so much for us on the offensive end and tonight we had to find ways,” Horford said. “I felt like Jae Crowder answered the call.”

Boston moved within two games of the idle Cleveland Cavaliers for the top spot in the Eastern Conference.

Lopez led the Nets with 23 points and Randy Foye added 14 for Brooklyn, which trailed by 10 points with 2:57 left in the third quarter after Kelly Olynyk’s layup made it 68-58.

Andre Nicholson’s jumper then started a 13-3 run with 2:32 remaining that spanned into the fourth quarter. The reserve forward’s 3-pointer tied it 71-71 with 11:03 to go and after a Boston turnover, Acy’s 3 in front of the bench gave Brooklyn a 74-71 lead with 10:32 on the clock while Crowder sat on the bench.

Both teams traded leads before Crowder hit a 3-pointer on a pass from Horford to give Boston an 88-85 lead with 3:36 left in the fourth.

Horford then found Thomas’ replacement, on offense for the night, driving baseline for a dunk to extend the lead to 90-85 before being fouled by Brooklyn’s Spencer Dinwiddie with 2:51 remaining. After a Nets timeout, Crowder completed the three-point play with a free throw to extend the lead to six points.

“He’s a tough matchup and he’s so versatile,” Nets Coach Kenny Atkinson said. “He’s one of those guys in this league that’s built like a four-man who can play the three and the four. The dunk and then the two 3-pointers I thought were killers.”

Horford’s 19-foot jumper made it 93-85, Lopez and Dinwiddie led an 8-0 run to cut Boston’s lead to just two, 93-91, with 44 seconds left.

A pair of free throws by Marcus Smart made it 95-91 before Jeremy Lin knocked down a 12-foot shot that drew the Nets within two again with 16 seconds to go.

Smart then made a pair of free throws that extended Boston’s lead before Foye drew the Nets within two points with a layup. Bradley then hit the second of two free throws to cap the scoring.