There was more than one occasion when they looked doomed, destined to crash with a disappointing thud and fail to capitalize on a golden chance to capture the imagination of casual basketball fans in the area.

Two weeks ago, the Nets were considered out of the playoff picture, too far behind the final spot and with three teams to climb over. But here they are with eight games remaining, in a tie with the Heat for seventh place in the Eastern Conference. They got there Wednesday night by winning their season-best fifth consecutive game, edging the Knicks, 100-98, at Madison Square Garden.

Don't call it a comeback. Just a surge at the perfect time.

"It's good,'' Alan Anderson said before tipoff. "I mean, considering we've been so inconsistent all season and still know we have still got a playoff shot and it's all up to us, it's a good situation to be in.''

That's what makes this stretch run by the Nets all the more impressive. They continued their surge in cardiac fashion, capping a four-game season sweep of their crosstown rivals for the first time since 2006-07.

Deron Williams torched the Knicks for 26 points, seven assists and seven rebounds, exploding for 12 points in the third quarter of a game that came down to the final seconds. It was in doubt until Brook Lopez tipped in his own miss -- following Williams' miss on a driving layup -- with two seconds remaining.

Rookie Cleanthony Early's three-point try from beyond the key at the buzzer hit nothing but air, preserving the Nets' eighth win in their last nine games.

Andrea Bargnani paced the Knicks with 22 points.

In winning nine of their last 11 games, a record that's second only to the 10-1 mark the Warriors compiled during that same stretch, the Nets have found their rhythm and mojo. They've overcome injuries. Lopez is playing as well as he has all season. The big man no longer is searching for his role and his shot within the offense. He struggled with that earlier in the season when coach Lionel Hollins tried to reinvent him, attempting to mold Lopez in similar fashion to the All-Star tandem he had in Memphis in Zach Randolph and Marc Gasol.

Not even the Nets' 15-20 record at Barclays Center, which has been a billion-dollar house of horrors for them, has held them back. They've enjoyed a balanced scoring attack of late, with six players averaging double figures during the previous 10 games -- Lopez (23.3 points), Joe Johnson (14.7), Thaddeus Young (13.8), Williams (10.8), Anderson (10.3) and Bojan Bogdanovic (10.3).

Given their upcoming schedule, the Nets are going to need all the firepower they can get. All but one of their final nine games matches them against a team currently lined up in a playoff spot -- and that's not until the April 15 finale against the Magic.

In the next week alone, the Nets take on the Eastern Conference-leading Hawks twice and square off against the Raptors, Trail Blazers and Wizards.

"I just want to win no matter who we play against, where we are playing and just go out and play well,'' Hollins said, "because that's it.

"Coming down the stretch, all I hear is playoff, playoff, playoff. All I say is, go out there and play as well as you can play. And if we are good enough, we will win. If not, we won't. But go give your effort and that's the way I keep it.''