NEW YORK (AP) — The New York Knicks are back in the playoffs, clinching their first postseason berth since 2004 with a 123-107 victory over the Cleveland Cavaliers on Sunday behind 28 points from Amare Stoudemire.

Shortly after Charlotte’s home loss to Washington, the Knicks snapped an 11-game losing streak against the Cavaliers to secure their spot. They are seventh in the Eastern Conference, but closed within 1 1/2 games of the 76ers, with a game in Philadelphia this week.

Carmelo Anthony scored 25 points and Chauncey Billups added 23 for New York, which was tied with Minnesota for the NBA’s longest playoff absence. The Knicks evened their record at 38-38 as they try to end an even longer drought, a franchise-worst stretch of nine straight losing seasons.

Stoudemire proclaimed the Knicks were back even before officially signing in July, and snapped out of a recent slump in time to ensure the return of playoff basketball to Madison Square Garden.

New York hasn’t seen the postseason since it was swept in four games by New Jersey in 2004. The Knicks will likely face either Miami or Boston, hoping Stoudemire, Anthony and Billups can match whichever Big Three they draw.

Billups scored 17 points in the first quarter, and Stoudemire, who had complained recently of being tired after carrying the Knicks before their trade with Denver, helped New York put it away in the fourth.

J.J. Hickson had 23 points and Baron Davis added 22 for the Cavaliers, who hadn’t lost to the Knicks since Dec. 19, 2007, at Madison Square Garden.

They were trying to complete what would have been an unprecedented season series sweep. Instead, they fell behind quickly, then nearly erased all of a 22-point deficit before the Knicks pulled away again.

No team with a record as bad as the Cavs (15-61) has ever swept a four-game season series from a playoff team. The Atlanta Hawks were 26-56, a .317 winning percentage, when they won all four meetings with Indiana in the 2005-06 season, according to STATS LLC.

But the Cavs lost their third straight since their victory over LeBron James and Miami.

Nobody was quite sure why the Cavs were so successful against the Knicks this season, with two of their victories coming after the Knicks traded for Anthony and Billups.

“I think a lot of it has to do with the fact that this Knick team is not a team that can just overpower you. They’re not a whole lot bigger than we are, probably about the same athletic-wise,” Cavs coach Byron Scott said before the game. “Obviously they’ve got two fantastic scorers, but I think we’ve just kind of been able to hang in there during the games and for whatever reason we’ve got confidence that we can come out here and play with these guys.”

But the Knicks came out with a focus they’d lacked in the previous Cleveland games, storming to a 36-25 lead after one behind 6-of-6 shooting from Billups. New York kept rolling, opening a 61-39 lead on Anthony’s jumper with 4:09 remaining in the second quarter.

Davis then hit three 3-pointers before half, bringing the Cavs within 67-57 at the break. Cleveland got as close as two midway through the third, but New York opened it up again with a 12-0 run early in the fourth for a 105-90 lead with 8 minutes remaining.

Audio: Coach Mike D’Antoni discusses the win over the Cavs and the Knicks making the playoffs for the first time since 2004.

NOTES: Anthony was trying to become the first Knicks player since Bernard King in 1984 with four straight games of 35 points. He had 36, 39 and 39 in the last three outings. … With the NBA celebrating its “Green week” to promote being energy conscious, players from both teams wore specially designed shooting shirts that read “NBA Green” in green print. That’s not a good look to Scott, who as a former Lakers star doesn’t like anything in Celtics colors and joked that he wouldn’t wear it. “The players can wear that stuff. I ain’t wearing that thing,” he said. “I’ll take it home, use it to wash my car or something like that.”