The long nightmare is over.

The Hawks ended an eight-game losing streak with a dramatic 107-98 victory over the Knicks Saturday night at Philips Arena. They had to overcome a 17-point deficit to do so.

Playing without Paul Millsap, the team’s latest injury, the Hawks started the fourth quarter with four straight 3-pointers to finally overcome the huge deficit. Lou Williams hit the first of back-to-back long-range baskets to give the Hawks a 74-73 lead, their first since the second quarter. They pushed the advantage to seven points as Jeff Teague hit a 3-pointer, two free throws and completed a three-point play.

The lead would grow to seven points.

Then nine points.

Then 10 points.

And then 12 points.

A collective sigh of relief could be heard from the Hawks players, coaches and fans.

“Our group needed this win,” coach Mike Budenholzer said. “I think it would be naïve to say that it’s not important for us to get this.”

Mike Scott, DeMarre Carroll, Teague and Williams had huge efforts in the victory. Those three, along with Elton Brand, played much of the second half and were responsible for the rally.

Scott had a career-high 30 points, including 6-of-7 shooting from 3-point range. He made 11 of 14 field goals, for career-highs in points, 3-pointers and field goals. He became the first Hawks player to score 30 points off the bench since Jamal Crawford (37 points on Feb. 4, 2011).

“I was in the zone,” Scott said. “Every player knows how it feels to be in the zone. I just kept being aggressive and let the game come to me.”

Teague, playing on a sprained ankle, was aggressive in getting to the basket for 28 points. He scored 10 of the Hawks’ 13 points in a fourth-quarter stretch.

“When you are playing small ball, you have a lot of open lanes,” Teague said. “Our team was really fast and we were getting the ball out and having Mike (Scott) out there really stretched the floor and made it a lot easier to get in the lanes and make plays.”

Carroll finished with a career-high 24 points, including a dagger of a 3-pointer and foul, with under a minute remaining. He had 14 third-quarter points when the Hawks started their winning rally. He and the Knicks’ Carmelo Anthony got technical fouls in the third quarter for a back-and-forth exchange. Knicks coach Mike Woodson was also called for a technical in the flurry.

“It got everybody going,” Carroll said. “It got the home crowd into it. It got my teammates into it. I’m trying to develop into a leader. I think that is what we are missing. Eight in a row, that was too much.”

Williams added 14 points, nine rebounds and six assists. Brand, the 15-year veteran, had just one point but logged 43 minutes. He has played 135 minutes in the past four games. Kyle Korver extended his NBA-record streak to 124 games with a 3-pointer.

The Hawks (26-29, 17-10 home) also snapped a three-game losing streak to the Knicks in Atlanta.

The Knicks (21-35, 9-17 road) lost for the 14th time when tied or leading going into the fourth quarter this season. Anthony finished with a game-high 35 points. He was on the bench with four fouls when the Hawks made their decisive run. Tyson Chandler had 10 points and 23 rebounds.

The Hawks took a 10-point lead, 33-23, early in the second quarter. Scott started the period by scoring all nine points – by both teams.

Then the Hawks went cold. Ice cold.

The Knicks ended the second quarter on a 29-6 run as the Hawks managed just two field goals – 3-pointers by Scott and Korver – over the final 8:53. The Hawks were 2-of-16 with three turnovers during the drought. The Knicks took a 52-39 advantage into the intermission. They outscored the Hawks 29-15 in the second quarter.

The Hawks missed their first four shots of the third quarter and the Knicks pushed their lead to 17 points. The Hawks closed strong and trailed by just five points, 73-68, going into the final period. Carroll and Williams ended the third quarter with back-to-back 3-pointers. There would be more to come. It was the start of six straight 3-pointers.

“I think we have a competitive group so any time any team has lost a few games in a row I think it’s just a good feeling (to win),” Budenholzer said. “The exact words ‘sense of relief’ do not register or resonate with me. Our group has been competing. Our group has been focused. There have been a lot of good things even in that stretch. For them to be rewarded for how hard they are working, for their character and their competitiveness it’s nice to get that.”

The Hawks next host the Bulls on Tuesday.