Jeff Green  scored a game-high 34 points and Paul Pierce  and Brandon Bass  each had 17 as the Celtics  held off the Pistons, 98-93, Wednesday night at TD Garden. As it turned out, the Celtics clinched a spot in the playoffs by virtue of Philadelphia’s 88-83 loss in Charlotte as the fourth quarter was getting underway in Boston.
The Celtics snapped a two-game skid and improved to 39-36, maintaining their tenuous lead on Milwaukee for seventh in the Eastern Conference and out of a first-round encounter with the Miami Heat . With the Bucks losing at home to Minnesota, the Celtics now lead Milwaukee by 2.5 games for seventh in the East.
The Celtics won the game despite getting out-rebounded, 52-34, outscored in the paint, 58-28, and beaten in second-chance points, 26-7. Boston shot 50 percent on the night while holding the Pistons to 37 percent shooting, including 4-of-24 from 3-point range.
The Pistons had beaten Boston twice in their previous two meetings, scoring 103 points each time and winning by an average of 17 points a contest. Detroit shot 50 percent in each game in handing the Celtics two unexpected losses in Auburn Hills.
The Celtics appeared to be in for another long night against the bigger Pistons in the first quarter. Detroit jumped out to a six-point lead twice before settling for a 30-25 lead over Boston after 12 minutes.
Thanks to eight of his team-leading 23 points in the second, the Celtics outscored the Pistons, 29-14, and took a 54-44 lead to the locker room at halftime.
The Celtics built their lead to 18, 70-52, on two Bass free throws with 5:37 left in the third. They led by 18, 74-56, on a Chris Wilcox  layup with 3:50 left in the quarter. But the Celtics fell asleep the rest of the period, allowing the Pistons to score the final 11 points of the period and cut the lead to 74-67 heading into the fourth.
Two Brandon Knight  free throws with 9:21 left cut Boston’s lead to three, 79-76.
Charlie Villanueava blew a layup with eight minutes left that would have cut the lead to one. The Pistons threw away another fast break chance with 7:22 left and Pierce came down and hit a jumper to put Boston back up five, 83-78, with seven minutes left. Villanueva, the University of Connecticut product, gave the Celtics a chance to avoid another embarrassing loss. Villanueva was 2-for-17 from the field and missed all eight 3-point attempts.
Green’s jumper with 4:55 left put Boston up, 89-80. His put-back slam dunk of a Jason Terry  missed jumper with 3:36 brought the crowd to their feet and put Boston ahead, 91-83. A technical on the Celtics bench and a two Greg Munroe free throws cut the lead down to four, 91-87, with three minutes left but Green answered with an 18-foot jumper with 2:56 left.
Jonas Jerebko gave Detroit new life with a three with 2:29 left, as the Pistons pulled within 93-90. Knight, infamous for getting dunked on by DeAndre Jordan of the Clippers, blew a wide open layup with just under two minutes left that would’ve drawn the Pistons within one.
Green’s third trey of the night from the left baseline put Boston up 96-91 with just 45.3 seconds left. Rodney Stuckey  passed on a wide-open, game-tying three with 20 seconds left, instead deferring to Villanueva, who missed his seventh triple attempt of the night.
The Celtics continue their four-game homestand on Friday night at the Garden with a game against the Cleveland Cavaliers . For more from Mike Petraglia and Ben Rohrbach from the Garden, visit the Celtics team page at weei.com/celtics .