Khris Middleton made one of two free throws with 0.6 seconds left and the Milwaukee Bucks defeated the Boston Celtics 112-111 in improbable fashion on Tuesday night.

Middleton drew a foul on Avery Bradley to get to the line. Boston had tied the game when Kelly Olynyk made two free throws with one second remaining.

Milwaukee appeared to have won the game on Greg Monroe’s last-second hook shot, giving the Bucks a 111-109 lead. Olynyk then drew the foul with no time expiring off the clock.

Monroe, who was removed from the starting lineup, had 29 points and 12 rebounds as the Bucks ended a five-game losing streak. Middleton had 20 points and Michael Carter-Williams, who also was benched, added 16.

Crowder and Bradley had 18 points each for the Celtics.

After trailing by a point at halftime, Milwaukee built a 19-point lead after three, sparked by late 3-pointers by Middleton and Bayless and a buzzer-beating, left-handed hook shot by Monroe.

Boston, which had won nine of 10, chipped away at the lead throughout the fourth before Jae Crowder hit a 3-pointer with 22 seconds left to tie it.

The Bucks made a major to their starting lineup, benching Monroe and Carter-Williams and inserting Miles Plumlee and O.J. Mayo, who was returning from a lengthy injury absence.

Monroe entered the game early in the first quarter, and Carter-Williams followed a few minutes later. Both had an almost immediate impact.

The Bucks grabbed their first lead at 49-46 on Rashad Vaughn’s 3-pointer with just less than five minutes remaining in the first half. The Celtics led 54-53 at the half.

The Celtics built a 10-point lead midway through the first quarter and held a 30-26 advantage at the end of the period. Boston shot 57 percent in the quarter.

(Copyright (c) 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox