J.R. Smith made the go-ahead three-pointer with 1:04 remaining and the Knicks got past the Bucks, 111-107, in Wednesday's crucial Eastern Conference matchup.

With the win, the Knicks moved two games ahead of Milwaukee for the conference's eighth and final playoff spot. They were paced by Carmelo Anthony's 32 points and got 19 from Tyson Chandler.

New York remains one game behind seventh-place Philadelphia in the East and four games behind Boston in the Atlantic Division after both the 76ers and the Celtics won on Wednesday.

After Smith's three-pointer put the Knicks up, 108-107, the Bucks missed three consecutive shots on their ensuing possession. Monta Ellis had 35 points and 10 assists in the setback, Brandon Jennings added 22 points and Mike Dunleavy finished with 19.

Milwaukee led, 94-86, early in the fourth before New York went on a 10-2 run, which saw Anthony execute a three-point play and Steve Novak make consecutive threes to tie the game at 96 and trigger the tight finish.

Luc Richard Mbah a Moute's putback layup had Milwaukee up 107-105 with 1:16 left, but Smith pulled up on the other end and knocked down the decisive three.

Ellis then failed to hit a short jumper and Dunleavy missed a three before being blocked by Anthony on his next attempt. Two free throws from Novak made it 110-107 with 19 seconds left, and Jennings' potential tying three was off the mark. Iman Shumpert made 1-of-2 from the line to seal the New York win.

The Knicks started hot, making 17-of-22 first-quarter shots en route to a 36-27 lead after one. But Milwaukee fought back, tying the game early in the second before going up, 42-38, on Beno Udrih's baseline jumper.

The game remained tight. It was 62-62 at the half and Milwaukee took a 88-84 lead into the fourth behind seven third-quarter points from Jennings.

Game Notes

The Knicks had lost their previous four games at Milwaukee...The game featured 16 ties and 18 lead changes.