Jason Kidd's return was the big story at Barclays Center Wednesday night, but there was still the matter of a basketball game to be played between the Nets and Kidd's Milwaukee Bucks. Beyond wanting to beat their old coach, the Nets had a losing streak they were desperate to stop.

After three overtimes, Kidd had the last laugh, guiding his surprising Bucks to a 122-118 victory that extended the Nets' losing streak to five.

After a back-and-forth game, the Nets (4-7) were down two and without the ball, but had a chance to tie or go ahead when the Bucks turned the ball over on a five-second call when Ersan Ilyasova couldn't inbound the ball with 15.5 seconds remaining. But Joe Johnson, who missed the potential winning shot at the end of the second overtime, missed a 20-footer from the right wing that would have tied the score at 120.

Brandon Knight's two free throws with 5.6 seconds left iced it.

The Bucks should have won at the end of the first overtime. After exchanging leads for the entire first quarter and overtime, Knight stole a pass from Johnson into the post intended for Brook Lopez and raced toward an unguarded basket with time running down. But Knight missed a gimme layup and the horn sounded as the ball bounded off the rim with the score tied at 105.

Knight would redeem himself by hitting the three-pointer that tied it at 112 and forced the third overtime after Johnson's miss at the buzzer.

In the third overtime, Ilyasova made the first two baskets and the Nets were playing catchup after that. A three-pointer by Bojan Bogdanovic kept the Nets in the game, but they never could catch up.

Bogdanovic had the ball in his hands again with a great look at a top left three-pointer that would have put them in front with 19 seconds left in the period, but the ball went in and out and Milwaukee's Giannis Antetokounm grabbed the rebound.

Lopez, who has been struggling to maintain the confidence of coach Lionel Hollins recently, got off to a good start and played a strong game, leading the Nets with 27 points, seven rebounds and three blocked shots. Bogdanovic had 19 points and many huge plays.

Rookie Jabari Parker led Milwaukee with 23, and O.J. Mayo had 21 for the Bucks.