Second halves have been a struggle for the Celtics at times this season. But boy, did they pick a good night to buck that trend.

Facing a win-or-go-home scenario Saturday night in Detroit, the C’s turned in one of their most dominant second halves of the season, outscoring the Pistons 66-44 to overcome a double-digit first-half deficit and advance to the NBA Cup semifinals with a 117-103 win.

The last time the Celtics were in Detroit, on Opening Day, it was the Pistons who rallied from 22 points down to come away with a win. This time, Boston was the team doing the rallying.

“The first half was a team that we don’t want to be, and the second half was what we need to be,” Jayson Tatum said after the game.

The Celtics shot an impressive 53.5 percent in the first half, but 10 turnovers contributed to a 59-51 halftime deficit. They came out of the locker room looking like a different team, however, erupting for 38 points in the third quarter to seize control of the game.

Derrick White was at the forefront of that turnaround. After not attempting a single shot in the first half, the veteran guard poured in 12 points during the third quarter, marking his highest-scoring frame of the season. Tatum chipped in 11 points of his own during the period, as the duo matched Detroit’s entire scoring output in a quarter that Boston won 38-23.

One of the biggest differences between the two halves was Boston’s offensive aggression. After attempting just one free throw in the first half, the Celtics earned 20 attempts from the stripe over the final 24 minutes.

“I thought their offensive physicality increased and they were getting to their spots, they were easily getting to the paint,” Pistons head coach J.B. Bickerstaff said. “They’ve got some guys who are really good one-on-one scorers.”

The Celtics’ physicality was equally apparent on the glass, where they doubled up the Pistons 28-14 in second-half rebounds. Boston piled up 10 offensive boards despite missing just 19 field-goal attempts over the final two quarters.

Boston’s 66 points tied for the second most it has scored in a second half this season, while its 44 points allowed tied for the third fewest.

And just about everyone had a hand in making it happen.

“The competitive joy that we played with, everybody stepped up and made plays,” Tatum said.

The All-NBA wing led the way with 27 points, six rebounds, six assists, and three blocked shots. It marked the 122nd game of his career in which he recorded at least 25 points, five rebounds and five assists, moving him past Paul Pierce and into third place on Boston’s all-time list of such games. Only Larry Bird (306) and John Havlicek (206) have more such performances in a Celtics uniform.

Payton Pritchard provided a major boost off the bench, single-handedly outscoring Detroit’s reserves 23-18 while shooting 10-of-12 from inside the 3-point arc. Over his last three games, he has averaged 18.7 points on 62.2 percent shooting from the field.

Jordan Walsh was Boston’s third-leading scorer with 17 points on 7-of-9 shooting, continuing an impressive stretch of play since returning to the rotation. After logging back-to-back DNPs last week, Walsh has shot 79.0 percent from the field over Boston’s last three games.

Paul George rounded out the balanced effort with a. double-double of 16 points and 10 rebounds to go along with three assists.

The Celtics will now have an opportunity to avenge another loss Tuesday night when they travel to Atlanta for their semifinal matchup against the Hawks, who edged them 87-86 last Friday night in the finale of NBA Cup group play. Memphis and San Antonio will square off in the other semifinal matchup later that night.

One win now stands between the Celtics and their first trip to the NBA Cup championship game.

“This is what the Cup is all about. It’s win or go home,” Tatum said. “The atmosphere, the energy, guys competing for something, that’s what it’s all about. So survive and advance.”