The Celtics are starting to settle into a groove.

Boston won its third straight game Tuesday night, beating the Detroit Pistons 108-105 at TD Garden.

It was an even affair in the first half, but the Celtics took control by outscoring the Pistons 25-13 in the third quarter and preserved the lead the rest of the way, despite a late comeback from Detroit.

Kyrie Irving led the Celtics with 31 points. Jayson Tatum (16), Marcus Morris (15), Jaylen Brown (14) and Al Horford (11) also tallied double figures for Boston. Blake Griffin led Detroit with 24 points and was one of five Pistons in double figures.

With the win, the Celtics climb to 5-2, while the Pistons fall to 4-2.

Here’s how it all went down:

STARTING FIVE
PG: Kyrie Irving
SG: Jaylen Brown
F: Jayson Tatum
F: Gordon Hayward
C: Al Horford

BUSY FIRST
The Celtics finished the first period leading 31-28 in what was a helter-skelter 12 minutes.

During parts of the middle stages, both teams struggled to establish their offense, with turnovers (four for each team in the period) and missed attempts with plenty of time on the shot clock resulting in a lot of upbeat transition play. At one point Boston led by eight, but the Pistons kept creating chances on the offensive end and defending well enough on defense.

The Celtics got nice contributions from its bench, as the reserve unit tallied 16 points with Aron Baynes leading all players with nine first-quarter points.

PISTONS GET AHEAD
It mostly was level-pegging again in the second, as the Pistons outscored the Celtics 30-25 and took a 58-56 lead into the break.

The Celtics opened their lead up to seven points three-and-a-half minutes in, but Detroit chipped away and tied the game at 5:14 before taking their first lead of the game since early in the first quarter 31 seconds later. From there, both sides kept trading chances until Reggie Jackson drilled a 29-foot trey to put the Pistons ahead just before the halftime buzzer.

Boston shot 48.8-percent (20-for-41) from the field in the opening pair of quarters. Irving, Griffin and Drummond all had 12 points through 24 minutes.

C’S START ROLLING
After a tight first half, the Celtics really started to settle into a rhythm in the third, outscoring the Pistons 25-13 to give themselves an 81-71 lead heading into the final frame.

Trailing by two early in the stanza, Boston ripped off a 10-0 run over 2:43, going ahead 68-60 with 6:20 left. The Celtics then really started to grab control. Boston took their biggest lead of the game to that point (12) with 2:52 left in the frame thanks to a 3-pointer from Irving. The trey was the final one for Irving in a run over 96 seconds that saw him knock down three shots from distance.

Irving had a game-high 13 points in the quarter, while also leading players with 25 points through three periods.

CELTICS FIGHT OFF COMEBACK
The Pistons made things interesting in the fourth, as they outscored Boston 28-22, but the Celtics did enough to hold on to the victory.

Detroit was able to mount a comeback when Boston went into a dreadful offensive drought, unable to hit a field goal for 6:34 starting at the 10:41 mark. In that time the C’s hit five free throws, but it allowed the Pistons to get back in the game. It took the visitors a little bit of time to get going on the offensive end as well, but a 10-2 run in the midpoint of the quarter cut Boston’s 88-79 lead to 90-89.

With the Celtics leading 101-99 with 15 seconds left, Morris hit a pair of free throws to up the lead to four. Ish Smith responded with a 3-pointer to cut the lead to one with 11 seconds remaining, but Tatum knocked down a pair of free throws to bring the lead up to three. The Pistons’ responding inbound pass went wide, with Marcus Smart beating Smith to the ball on a dive. He sent it to Irving, who was fouled and proceeded to hit two free throws to extend the lead to five.

Reggie Bullock splashed a 3-pointer to narrow Boston’s advantage back to two with 0.4 to play, but Tatum put the game away by hitting a free throw.

UP NEXT
The Celtics will remain at home for a Thursday night matchup with the Milwaukee Bucks. Tip-off from TD Garden is set for 8 p.m. ET.

Thumbnail photo via Winslow Townson/USA TODAY Sports Images