AUBURN HILLS, Michigan — The Detroit Pistons achieved their highest point total in regulation on Wednesday night. They still couldn’t feel comfortable until the final buzzer.

The Pistons, who lost two heartbreakers at home in the past week, took the lead with a 14-0 run in the fourth quarter and held off the Boston Celtics 119-116 at The Palace.

Detroit lost on a half-court heave by Memphis forward Matt Barnes a week earlier and squandered a four-point lead in the final 30 seconds of regulation during an overtime loss to the Los Angeles Clippers on Monday. The Pistons scored 101 points in the final three quarters on Wednesday but required five free throws in the final 18.6 seconds to put away the Celtics.

“We couldn’t get stops down the stretch,” Pistons coach Stan Van Gundy said. “We’ve got to get that together. It’s two games in a row we haven’t defended down the stretch. That was a disappointment.”

He had no issues with his team’s offensive flow. The Pistons have reached 100 points in eight of the last 10 games after hitting that mark five times during their first 17 games.

Shooting guard Kentavious Caldwell-Pope scored a career-high 31 points, surpassing the 30-point game he had against Oklahoma City in the final game of his rookie campaign in 2013-14.

Van Gundy added some new sets during practice on Tuesday that featured Caldwell-Pope.

“Obviously, they worked,” said Caldwell-Pope, whose previous season high was 22 points. “We were running them and making plays out of them.”

Point guard Reggie Jackson had 23 points, including 14 in the fourth quarter. Center Andre Drummond notched his league-high 23rd double-double with 16 points and 12 rebounds for the Pistons (15-12).

“Our guards are making great plays and making a lot of shots right now,” Drummond said. “It’s fun to watch.”

Point guard Isaiah Thomas tied his career high with 38 points for the Celtics (14-12). Center Jared Sullinger had 17 points and 10 rebounds and reserve center Tyler Zeller added 12 points.

Boston reserve shooting guard Evan Turner, who delivered the 1,500th assist of his career, chipped in nine points and nine rebounds.

The Celtics committed 18 turnovers, leading to 23 Detroit points.

“We weren’t very good with the ball and we need to just play better, that’s the bottom line,” Boston coach Brad Stevens said. “Detroit’s a good team. We needed to play really well to win and we didn’t play well.”

Zeller’s layup in the opening seconds of the fourth quarter tied the score at 85, but the Pistons reeled off 14 straight points. Caldwell-Pope and Drummond scored after making steals, and backup forward Anthony Tolliver hit back-to-back 3-pointers. Sullinger ended Boston’s drought with a 3-pointer.

Celtics reserve forward Jonas Jerebko cut the Pistons’ lead to four, 101-97, with a 3-pointer. Jackson then got hot to keep the Celtics at bay. His banker with under two minutes to go made it 114-108.

Turner’s three-point play with 19.3 seconds left cut Detroit’s lead to 114-113. Caldwell-Pope sank two free throws for a three-point edge. Jerebko missed a layup and Caldwell-Pope made two more free throws.

Thomas dropped in a 3-pointer with 2.7 seconds left, but Jackson hit a free throw to seal the Pistons’ win.

“We probably should have executed a little better and taken care of the ball,” Jerebko said. “It just didn’t go our way today.”

Drummond was a non-factor in the first half, contributing just two points and two rebounds, until he pulled down a defensive rebound and fired in a half-court shot as the buzzer sounded.

The second 3-pointer of his four-year career — and first since his rookie season — gave Detroit a 55-52 halftime lead.

“It’s sort of a feel-good moment,” Van Gundy said.

NOTES: Pistons PG Brandon Jennings, out since rupturing his left Achilles tendon in January, is expected to begin a rehab assignment with their D-League affiliate in Grand Rapids on Saturday. “He does want to go up there and play,” coach Stan Van Gundy said. “It gives him a chance to play big minutes instead of the 15-20 minutes we’re able to give him.” … Boston coach Brad Stevens believes Detroit C Andre Drummond, the league’s top rebounder, will make his first All-Star appearance. “Every time the ball hits the rim, you’re fearful he’s going to get it,” Stevens said. … The Celtics were forcing a league-best 18.3 turnovers per game heading into Wednesday’s game. “It’s a very, very aggressive defensive team,” Van Gundy said. … In a scheduling quirk, Detroit’s next home game is also against Boston the night after Christmas. … Stevens said there is no timetable for PG Marcus Smart’s return, but he has been doing some on-court drills. Smart (left leg) has missed 15 consecutive games.