The Celtics were ahead, 103-78, with less than three minutes to go in the third quarter, but had to scramble after the Hawks pulled even midway through the fourth quarter. Kyrie Irving was one assist shy of his second straight triple-double in the 129-120 victory Saturday afternoon.

BOSTON – The last time they played a Saturday game at home, the Celtics kicked away a 28-point lead and lost to the Los Angeles Clippers.

It ranks as the ugliest loss of the season since the Celtics piled up 74 first-half points, then fell apart in the second half.

Five weeks later, the Celtics played another Saturday game at the TD Garden, this one a matinee against the lottery-bound Atlanta Hawks, and once again they put together a 74-point first half.

The Celtics built a 25-point advantage late in the third quarter and looked like they were going to cruise home, only to have flashbacks pop up all around the Garden.

The Hawks went on a 34-9 run over a span of 8:34 that pulled them even midway through the fourth quarter, and the Celtics looked like they might be on the verge of blowing another massive Saturday lead at home.

But with Jaylen Brown, Marcus Morris and Kyrie Irving leading the way down the stretch, the Celtics recovered just in time and got past the Hawks, 129-120, for their fifth win in the last six games.

“A little frustrating because I feel like we let our foot off the gas and let them back in the game and we had to fight,’’ said Al Horford, who sat out part of the second half due to a sore knee. “We need to figure that out because Monday we have a tough one (the Denver Nuggets).

“We have to improve on that. We weren’t very happy with the way things turned out. We can’t do that, we just can’t. We have to tighten that up.’’

The Celtics were in front, 74-62, at the half and outscored the Hawks, 29-16, to begin the third quarter for a 103-78 lead with 3:12 remaining.

But the second unit, minus Gordon Hayward (strained neck after a first-quarter collision) struggled into the fourth quarter and suddenly the Hawks were even at 112-112 with less than six minutes remaining.

“We’ve just got to have a sense of maturity,’’ said Kyrie Irving, who nearly had his second straight triple-double with 30 points, 11 rebounds and nine assists. “We throw a few of the young guys out there and (the Hawks) started picking up their pressure, started being tougher.

“It’s good experience for those young guys to get that. To be mature about having the lead, you’ve got to keep the pressure on them, but you’ve got to play smart basketball at both ends of the floor and we didn’t do that and it showed. We just learn from it and go from there.’’

Brown (23 points) had eight points in the final 5:26, breaking the tie with a 3-pointer to send the Celtics on their way. Morris (19 points, 11 rebounds) had five points down the stretch and Irving hit a 3-pointer that opened the margin to 11.

The final kick was enough to allow the Celtics to survive a brutal nine-minute stretch late in the third quarter and into the fourth quarter when another massive lead disappeared.

“It’s maddening because what happened in the end of the third, early fourth was they ratcheted up their pressure and we were on our heels and you could see it,’’ said coach Brad Stevens. “You could hear their bench one time yelling, “Go, go, go.’ You knew a trap was coming and we turned it over. We were on our heels, they were attacking us.

“We need to stay in the moment better and play better all the way through the game.’’

Rookie Trae Young (26 points) led the way for the Hawks, hitting five 3-pointers, and the Celtics defense struggled for a good portion of the game. They have now allowed 140, 120 and 120 points in the last three games.

“That’s three in a row I think we’ve struggled defensively, not played as well as I would have liked,’’ said Stevens. “Our defense needs to improve and it’ll get challenged mightily here over the next week (against the Nuggets and the Philadelphia 76ers).

“I’m encouraged by the response (in the last six minutes). We should not have been in the position we were in. That was due to that small stretch of game.’’

Having Irving, who continues to do a little bit of everything, also helped give the Celtics the upper hand. After having just one career triple-double before last week, he put together one against the Kings and just missed against the Hawks.

“Just trying to play the game the right way, play with unbelievable effort, making sure I’m getting guys involved but staying aggressive and looking for my shot,’’ said Irving, who was 12 for 24. “As I do that, the more it starts to open up for my teammates. I was being a little bit more conservative in the game before the all-star break.

“Since then I’ve tried to be as aggressive as possible. When I’m aggressive the team is aggressive and it helps us.’’

Jim Fenton may be reached at jfenton@enterprisenews.com. Follow him on Twitter at @JFenton_ent.