BOSTON — After the Celtics dropped two of their first three games following the All-Star break, Coach Brad Stevens all but reduced his message to one word as his team prepared to open a season-high, five-game homestand: pride.

“This is a pride game. We really have to come out and get this first win,” forward Jae Crowder recalled from Stevens’ pregame speech.

Message received.

Isaiah Thomas scored 27 points, including eight in the fourth quarter, and the Celtics recorded their ninth straight home victory, 112-107 over the Milwaukee Bucks on Thursday night.

Crowder added 20 points and eight rebounds. Avery Bradley finished with 18 points. All five Boston starters were in double figures.

Crowder said he is equally taking a lot of pride in being the “glue guy” for a group still learning to harness its youthful energy.

“I just want to make that winning play,” he said. “Whether it be that rebound, that steal, that shot. I want to do whatever it takes to win and whatever it takes to hold this team together.”

The Celtics led by as many as 18 before Milwaukee trimmed it to single digits.

But Boston was able to beat back the threat thanks to some baskets late in the shot clock, and stops on the defensive end.

Jabari Parker led Milwaukee with 22 points and added five assists. Khris Middleton had 21 points and six assists, and Greg Monroe scored 20 points off the bench.

Milwaukee got the lead down to five on an alley-oop pass from Middleton to Parker with just over 6 minutes to play.

The Celtics promptly responded with a 10-4 run, which included seven points from Thomas, to push the lead back up to 106-95.

Another Milwaukee spurt got it back to 106-100. Then after a folly-filled possession by the Celtics that included players slipping, a diving save and an eventual turnover by Bradley, the lead was reduced to four on a dunk by Middleton.

Boston’s next possession looked just as doomed before Thomas drove and at the last second flipped a pass behind his head to Crowder in the corner, who promptly drilled 3-pointer.

Milwaukee stayed with its recent lineup adjustment, going with O.J. Mayo and Miles Plumlee in place of Monroe and Michael Carter-Williams for the sixth consecutive game.

“The lineup change, we’ve had confidence, so that’s not the problem,” Bucks Coach Jason Kidd said. “We’ve got to take care of the ball. We had some turnovers there, also offensive rebounds. Again, we gave up too many of those tonight against a very talented team.”