MILWAUKEE (AP) Milwaukee's Giannis Antetokounmpo feared the worst when he saw Boston's Daniel Theis all alone with the game on the line.
Antetokounmpo could breathe a sigh of relief a moment later when Theis' 3-pointer bounced off the rim.
Milwaukee blew most of a 25-point lead before holding on for a 121-119 victory over the Celtics on Wednesday night. Theis' last-second miss finished the Bucks' eighth straight victory.
''Thank God he didn't make it and we were able to get the win,'' Antetokounmpo said.
Khris Middleton had 27 points and 13 rebounds for the Bucks, who have won 13 of 14 overall. Bobby Portis had 21 points on 7-for-10 shooting.
Boston lost for the fifth time in six games. Jaylen Brown had 24 points and 10 rebounds, and Kemba Walker scored 23.
After trailing 90-65 midway through the third quarter, the Celtics cut the margin to two on Brown's 3-pointer with 1:32 left. Theis then drew an offensive foul on Antetokounmpo, and the Celtics had multiple opportunities to tie the game or go in front the rest of the way.
That's when the Bucks' defense stiffened.
Marcus Smart missed a 3-pointer with 1:06 remaining. Donte DiVincenzo blocked a layup attempt from Walker with about 35 seconds remaining. Brook Lopez blocked a Smart layup attempt with 2 seconds left.
''I think honestly, it may not seem it, but I think we did a great job of not tensing up,'' DiVincenzo said. ''I think we just made a few mistakes down the stretch, but I think it's good for us to learn how to get better off of a win.''
After the Lopez block, Middleton knocked Smart's ensuing inbounds pass out of bounds, giving the Celtics one last opportunity.
Smart found Theis all alone in front of the Celtics' bench, but the shot bounced off the rim as the buzzer sounded.
''Lopez is playing off Theis and just protecting any cut to the rim, so Theis was the best option there,'' Celtics coach Brad Stevens said. ''He got a great look. He stepped in and shot it with authority, back-rimmed it, looked good.''
Antetokounmpo and Boston's Jayson Tatum returned after the All-Stars missed games on Monday. Antetokounmpo rested during the Bucks' 140-113 victory over Indiana because of a sprained left knee. An illness kept Tatum from playing in a 132-126 overtime loss at Memphis.
Antetokounmpo scored 13 points - his second-lowest total of the season - but also had eight rebounds and seven assists. Lopez and DiVincenzo each had 17 points.
Tatum scored 18 points in the first meeting between the teams since the season opener. Jeff Teague added 15.
That first Celtics-Bucks matchup also was a thriller. The Celtics won 122-121 in Boston when Tatum banked in a 3-pointer in the final second and Antetokounmpo missed a potential tying free throw.
This time, a last-second shot from the Celtics didn't fall.
''We were a little bit fortunate,'' Bucks coach Mike Budenholzer said. ''Theis got clean for a free look. We were fortunate he didn't make it.''
Celtics: Reserve forward Semi Ojeleye bruised his left hip early in the second quarter. He was helped to the locker room. . The Celtics have lost five of their last six games.
Bucks: Reserve guard Bryn Forbes was held out with a toe injury. Forbes' absence resulted in an opportunity for Sam Merrill, who typically isn't part of the rotation but entered Wednesday's game late in the first quarter. ... P.J. Tucker, who sprained his left ankle in the Pacers game, played Wednesday and had three points and three rebounds in 19 minutes.
The Celtics and Bucks meet again Friday in Milwaukee.
Follow Steve Megargee at https://twitter.com/stevemegargee
More AP NBA: https://apnews.com/NBA and https://twitter.com/AP-Sports