Updated

Deron Williams capped a career-tying 21-assist performance by hitting a game-winning jumper with 1.7 seconds to play to lead the New Jersey Nets to a 107-105 victory over the Minnesota Timberwolves on Tuesday night.

Williams finished with 18 points as the Nets snapped a six-game losing streak and extended the Timberwolves' slide to a season-high 11 games.

The game wasn't decided until Michael Beasley had a 3-pointer bounce off the rim at the buzzer.

Brook Lopez had a game-high 30 points and 12 rebounds and Sasha Vujacic added 17 points and 10 rebounds for the Nets who won their 24th game, doubling their total of a year ago when they were the NBA's worst team.

Beasley and Anthony Randolph had 20 points apiece for Minnesota, with Beasley getting all of his points in the second half.

Travis Outlaw added 13 points and Jordan Farmar had 12 for the Nets, who blew a 13-point fourth-quarter lead before Williams saved the day.

Williams, who has struggled with his shooting the past month because of a wrist injury, didn't look for anyone else to take the final shot. He took the inbounds pass, worked the ball to the left of the basket, elevated and swished his final attempt on a night he was 6 of 15 from the field.

Trailing by 13 with 8:22 to play, the Timberwolves used a 10-2 run to close the gap, but they didn't tie the game until Outlaw was called for a goaltending violation on a short shot by Beasley with 7.8 seconds to go.

Minnesota actually had a chance to take the lead seconds earlier. Down 104-103 with 31.5 seconds to go, Randolph made a steal near midcourt and drove ahead of the field for what seemingly was going to be a go-ahead basket with Lopez in pursuit.

However, Randolph somehow lost control of the ball and it went out of bounds.

Vujacic was fouled on the ensuring possession and made 1 of 2 free throws to give the Nets a 105-103 lead.

Beasley tied the game but Williams, who also had 21 assists playing for Utah against Memphis in January 2007, had the last answer for New Jersey.

Both teams played without key players. Kevin Love missed his fifth game in the past seven for Minnesota with a groin injury. Nets power forward Kris Humphries missed his third straight with ankle and heel problems.

NOTES: Nets small forward Anthony Morrow did not play because of tendinitis in left knee. ...Williams got a technical for arguing that Luke Ridnour stepped out of bounds on a layup after no call was made. The Nets' single-game record for assists is 29 by Kevin Porter in 1978. ...The NBA high for assists this season is 24 by Rajon Rondo of Boston.