ATLANTA — It was the stuff of dreams for the Knicks, right before it very much wasn’t.

Carmelo Anthony, who missed Wednesday night’s game against the Cavaliers with a sprained ankle, was spry and productive. The triangle zipped with an efficiency that would make Phil Jackson beam with fatherly pride. And the Hawks — one of the best teams in the league and winners of five in a row — looked overmatched and underwhelming.

That was the first quarter. Everything after that? The Knicks were outscored by 29 points the rest of the way and fell to the Hawks, 117-98, on Saturday night at Philips Arena.

Said Derek Fisher, “Atlanta is a better team than we are — today, tonight for sure.”

Anthony had 18 points, 12 rebounds and four assists and shot 7-for-12 from the field for the Knicks (14-17), who took a 21-6 lead but were outscored 95-66 after the first quarter and have lost three in a row. Lance Thomas and Derrick Williams added 12 points each, Langston Galloway had 11 and Arron Afflalo scored 10.

Robin Lopez left the game after a third-quarter collision and had to get six stitches. Fisher believes he’ll be available for tonight’s game against the Celtics. Kristaps Porzingis injured his right index finger in the first half but continued to play. X-rays of the swollen finger came back negative and he expects to be available.

Paul Millsap led the Hawks with 22 points, seven rebounds and seven assists. Al Horford scored 19 points, Mike Scott 18 and Jeff Teague 17.

Millsap’s jumper with 8:22 left in the third quarter tied it at 68 and ignited a 15-3 run that gave the Hawks a lead they’d never relinquish. He had 11 points in the third quarter and Horford scored eight in the fourth.

“I thought we had some unforced turnovers, but I don’t think that was the key of the game,” Anthony said. “That third quarter — 27-12 — we came out of the gate, I don’t want to say not ready, but not prepared for the adjustment that they were going to make.”

The Hawks scored 62 points in the paint, compared to the Knicks’ 32, and “once they get into the teeth of your defense . . . it breaks everything down,” Anthony said. “They did a good job of attacking, of spreading us out, of getting in our paint and creating havoc.”

“If it was just one thing, I could tell you,” Jose Calderon said of the second-half collapse. “Stuff happened. We weren’t able to play as good as we did in the first half.”

The Knicks opened the game on a 14-2 run behind a very active Anthony, who scored nine points as the Knicks took a 32-22 lead after a quarter.

But whatever the Knicks built in the first quarter had all but evaporated 12 minutes later. The Hawks outscored the Knicks 38-31 in the second quarter and drew to within three when Teague’s desperation heave from a few feet beyond the arc made it 63-60 as time expired in the first half.

Notes & quotes: Fisher thinks Tim Hardaway Jr. belongs in the NBA, although the Hawks might think otherwise. Hardaway, who spent his first two seasons in the league with the Knicks and played under Fisher, was inactive for the eighth straight game. He’s played in only four games this season and spent two games in the developmental league.

“It’s a different situation,” Fisher said of Hardaway, who played 70 games with the basement-dwelling Knicks last season. “Tim is a young guy, a good player, a really good person, and he works hard, so I think he has to continue to wait for his opportunity and when it comes, take advantage of it.

“He joined a team that already had an identity and has a lot of returning guys, so it’s difficult to break through in those situations, but I think he belongs here in the league and I think when he gets his opportunity, hopefully he can make the most of it.”

Hardaway, who averaged 11.5 points last season, has averaged 2.5 points for the Hawks. He was traded to Atlanta on draft night for the No. 19 pick, which the Knicks used on Jerian Grant.