BOSTON — Isaiah Thomas made one of those special plays special offensive players make with the game on the line.

The result was the Boston Celtics holding off the Milwaukee Bucks on Thursday night for their ninth straight home victory.

“That one pass was unbelievable,” Boston coach Brad Stevens said after Thomas drove into the lane and somehow found forward Jae Crowder open in the right corner with a behind-the-head, sideways pass. Crowder hit a 3-pointer with 50.6 seconds left that nailed down the Celtics’ 112-107 victory.

Thomas struggled through a 2-for-10 3-point shooting night but still scored 27 points and had seven assists, including that final pass to Crowder and a behind-the-back setup for forward Amir Johnson in the third quarter.

“That was an unbelievable pass,” Milwaukee guard Michael Carter-Williams said of the pass to Crowder. “He’s a great player, he’s an All-Star, and he definitely showed why. (He) makes big plays in big-time moments.”

The Crowder 3-pointer finished a late outside flurry that saw the Celtics make three of their final four treys in the final 4:06 after starting the game 2-for-19 from behind the arc. They blew much of an 18-point lead but were able to salt the game away in the opener of a five-game homestand.

Thomas, asked if former Celtics assist man Rajon Rondo could have made a pass like that, said, “No doubt. You all probably seen that before. He probably did something even crazier than that.”

Boston guard Avery Bradley quipped of the pass, “I think he just threw it up, man. He made a great play, and Jae was able to finish it. That play right there describes our team.”

The Celtics, coming off a 1-2 road trip that gave them three losses in five games, continued their longest home winning streak since an 11-gamer in 2012-13.

Boston (34-25) led by 18 with 4:24 left in the third quarter and by 15 entering the fourth. However, the Bucks (24-34) rode center Greg Monroe and forward Jabari Parker back into the game, cutting their deficit to five with 6:15 remaining and then to four with 1:12 on the clock.

Stevens ended Thomas’ rest midway through the fourth, and the little point guard scored seven points in 1:35 to get the lead back up to 11. Fellow guard Avery Bradley and Thomas hit back-to-back 3-pointers.

Milwaukee came right back and cut it six. The game got sloppy, and a fastbreak dunk by guard Khris Middleton made it 106-102 with 1:12 remaining. Thomas then made big pass.

The Bucks absorbed their second loss in six games since coach Jason Kidd made a couple of lineup changes.

“We did a better job in the second half, which got us back into the game,” Kidd said. “Then it’s a four-point game (and) Isaiah makes a heck of a play to Crowder in the corner and he makes the three. Before all that happened, on the road we’re right where we want to be.

“It was (great),” Kidd said of the key pass. “Creativity. You talk about Isaiah, he’s having a heck of a year. He’s an All-Star, well deserved, and All-Stars make plays when needed for their team, and tonight he made a heck of a play to find his teammate in the corner.”

Crowder, coming off a career-high 27 points in a loss at Minnesota, had 20 points and eight rebounds. Bradley scored 18 points. Forward Jared Sullinger delivered 14 points and 10 rebounds, and forward Amir Johnson had 15 points and eight boards. Forward Jonas Jerebko had eight rebounds off the Boston bench.

Johnson, who has been bothered by back trouble, had totaled 10 points and seven rebounds in the previous four games.

Parker led the Bucks with 22 points, 10 in the fourth quarter. Middleton scored 21, Monroe had 11 of his 20 in the fourth quarter, and swingman Giannis Antetokounmpo (coming off his first career triple-double) added 14 points, eight assists and seven rebounds. Carter-Williams had 12 points off the bench.