BOSTON — The Detroit Pistons snoozed through 2 1/2 quarters but then rallied from 13 points down and pulled out a 99-94 victory over the Boston Celtics on Wednesday night.

Guard Reggie Jackson, who played his college ball at nearby Boston College, scored nine of his game-high 24 points in the final 6:01 as the Pistons (20-16) won for the third time in four games.

The Pistons, winning despite a season-low five rebounds by foul-ridden center Andre Drummond, trailed 73-60 with 3:18 left in the third quarter. Jackson scored with 6:01 remaining in the game to give his team its first lead and start a 7-0 run that put Detroit up by six.

Guard Isaiah Thomas scored the Celtics’ final 15 points, including seven in just 26 seconds. However, he missed two key free throws in the final 1:09. He scored 19 of his 22 in the second half and had 10 assists and five rebounds.

Drummond, who had two big baskets in the comeback, sat on the bench as Detroit coach Stan Van Gundy kept the Celtics from fouling him intentionally. The center had 37 rebounds in the first two games against Boston and came in averaging a league-high 16.1 per game.

Backup big man Aron Baynes salted the game away with two free throws with 29.7 seconds left.

Boston scored only nine baskets over the last 18:50 of the game, none in the final 1:42.

Detroit guard Kentavious Caldwell-Pope, who sank three 3-pointers in 65 seconds in the first half, finished with 20 points. Guard Stanley Johnson came off the bench to score 11 points, including a big 3-pointer with 58.2 seconds left.

Guard Evan Turner scored 17 points and forwards Jae Crowder and Amir Johnson 16 apiece for the Celtics, who lost their second straight. Johnson also had 11 rebounds.

Detroit also overcame 13 missed free throws and 18 turnovers to win.

The Celtics (19-16) used a 6-0 run to take a 10-4 lead, and they were ahead until the Pistons’ late rally. Boston was up by nine at the end of the first quarter, and with Drummond picking up his third foul with 6:25 left in the half, the Celtics maintained the lead — even though it was down to two with 4:37 remaining before the break.

The home team was by seven at halftime and built the lead to 11 early in the third quarter. Up 67-56 midway through the fourth quarter, the Celtics fouled Drummond, a dreadful foul shooter, on purpose. He missed both free throws and then picked up his fourth foul as the lead grew to 13.

The Celtics were having all kinds of trouble shooting, scoring two baskets in the final 6:51 of the third quarter, but the Pistons were unable to take full advantage, turning the ball over and missing shots to still trail by nine after three.

Suddenly, Detroit struck at the start of the fourth. The lead was down to two with 9:17 remaining, and the game was tied with 7:52 left.

NOTES: Celtics G Avery Bradley missed his second consecutive game with a hip injury. Coach Brad Stevens said Bradley is improving but hasn’t started to run. Bradley, averaging 14.7 points per game and a key in Boston’s defense, will accompany the team on its three-game road trip. The hope is that he can play in Game 2 on Sunday at Memphis. … Pistons G Reggie Jackson threw his support behind C Andre Drummond, endorsing his teammate for an All-Star berth. “He’s been playing phenomenal,” Jackson said. Drummond came into Wednesday night’s game averaging 18.1 points and a league-high 16.1 rebounds. … The Celtics have a “Vote Isaiah” push going for G Isaiah Thomas. … The Pistons will retire C Ben Wallace’s jersey in a Jan. 16 ceremony.

Knicks 98, Heat 90

MIAMI — The New York Knicks broke a streak of eight straight losses in this once-bitter rivalry, defeating the Miami Heat 98-90 on Wednesday night at AmericanAirlines Arena.

The Knicks shot 55.7 percent from the floor. Miami shot just 44.4 percent overall and 0.63 percent on 3-pointers (1 of 16).

New York (18-19) won its third straight game and exceeded the win total it had all of last season.

The Knicks were led by forward Carmelo Anthony, who had 25 points, and center Robin Lopez, who had 19 points. Knicks rookie forward Kristaps Porzingis, who was held scoreless in the first half, finished with 12 points.

Porzingis was on the wrong end of some second-half highlight plays. He missed what would have been an impressive dunk and later got dunked on by Bosh. Early in the fourth quarter, Porzingis got dunked on by Heat center Hassan Whiteside.

Miami (21-14) had its three-game win streak snapped. The Heat was led by forward Chris Bosh, who had 28 points, and guard Dwyane Wade, who added 18 points.

New York led 22-21 after the first quarter and extended its advantage to 47-39 at the break. The Knicks ended the first half on a 15-4 run. Anthony, Bosh and Wade all had 12 points at the half.

The Knicks shot 56.8 percent in the first half while holding Miami to 40.0 percent, including 0 for 7 on 3-pointers.

New York extended its lead to 71-59 after three quarters.