To match their longest winning streak of the season and get back to .500, the Knicks needed to defeat the NBA’s worst team and then the tired shadow of one of its best.

They did so, and they’ll take it. Gladly.

The Knicks earned their fourth straight victory by beating the Bulls, 107-91, at Madison Square Garden Saturday night, but although both teams were playing the second game of a back-to-back, one of these was not like the other.

On Friday night, the Knicks routed the 76ers and rested most of their starters in the fourth quarter. The Bulls lost to the Pistons in quadruple overtime in Detroit and didn’t get to their New York hotel until 4:50 a.m., coach Fred Hoiberg said.

The Bulls’ Jimmy Butler played 55:33, Derrick Rose 54:13 and Taj Gibson 44:06 on Friday night against the Pistons. Pau Gasol, who played just over 48 minutes and needed to rest, didn’t even make the trip to New York.

“Obviously, Chicago was completely wiped out tonight so we can’t look at it any differently than that, but we’ll take the win,” Knicks coach Derek Fisher said. “We’ll take advantage of every opportunity we get.”

advertisement | advertise on newsday

Carmelo Anthony scored 19 of his 27 points in the first half for the Knicks (14-14), who erased a 10-point first-quarter deficit, went ahead by 15 in the second quarter and extended their lead to 22 in the fourth quarter. Arron Afflalo had 18 points and Lance Thomas added 13 points and two steals off the bench.

“After a slow start, I think there was just an energy level and activity from Melo that was really high,” Fisher said. “It was great to see how active he was on both ends of the floor.”

Joakim Noah led the Bulls (15-10) with 21 points and 10 rebounds and Bobby Portis added 20 points.

Veteran players that are very competitive have a strong desire, a will to win that won’t be easy to break tonight just because Pau’s not in or they might be a little bit fatigued,” Fisher said before the game, conceding that at full strength, the Bulls currently are the better team. The Knicks are “scratching for every win we can get, night to night. I don’t think it will be any different tonight.”

The Bulls went ahead 12-2 three minutes into the game, but fatigue (and Anthony) won at the end. The Knicks ended the first quarter on a 16-2 run that gave them a 25-18 lead.

Knicks videos

But Fisher isn’t even close to satisfied. It’s true that the Knicks earned their 14th victory, a total they didn’t reach until March last season, but with their schedule about to get tougher in the coming weeks, they’re still struggling to gain the consistency they’ll need to survive.

“I do think we are improving in some sense, but we still have a long way to go in terms of our development,” Fisher said. “I don’t know. I think we have to find a way to become more consistent. I don’t want us to be a team that loses four in a row and then wins two in a row and then loses three and then wins four. I do think we have to figure out a way to make a jump in consistency. That’s what I want for us.”

He said after the game, “They really are capable of doing more things and better things. I think the credit goes to them turning around a situation that was difficult for the guys. We lost four in a row. They deserve a lot of credit for working together.”