BOSTON — Jeff Green scored 32 points, including a 3-pointer as Boston opened overtime with eight straight points, and the Celtics snapped a five-game losing streak by beating the Detroit Pistons 109-102 on Wednesday night.

The loss was the 10th in a row for Detroit. Greg Monroe scored 15 of his 29 points after the 3:13 mark of the fourth, when the Pistons erased an 11-point deficit. But Detroit never recovered after giving up the first three baskets – including a pair of 3-pointers – to start the extra period.

Andre Drummond had 27 points, 14 rebounds, four steals and five blocked shots, including Green’s potential game-winner at the end of regulation, for Detroit. Brandon Jennings had 12 assists and one point on 0-for-11 shooting.

Kelly Olynyk had 20 points and seven rebounds for Boston, which had lost six in a row at home.

Detroit led by six points in the second quarter and held their last lead in the third at 55-54.

Boston opened the fourth quarter with a 10-3 run with Olynyk scoring seven straight points on a dunk, a 3-pointer and a reverse layup that made it 73-64. He followed that up with a defensive rebound and bounce pass for an assist on Evan Turner’s basket that gave the Celtics an 11-point lead with 7:25 to play.

That’s when Monroe rattled off nine points in a row and, after Green made two free throws, the Pistons’ forward added another basket to make it 86-84 with less than a minute to play. It was 88-85 when Caron Butler sank a wide-open 3-pointer from the left wing to tie it.

The Celtics had a chance to win in regulation when Green drove and attempted a floater from about six feet that Drummond swatted away.

The Celtics led 18-8 in the first quarter before the Pistons scored the next 13 points and 15 of the last 18 in the quarter. Boston led 42-35 before Detroit scored the last eight points of the second quarter.