SACRAMENTO -- In the words of Kings shooting guard and NBA 3-point Champion Buddy Hield, “It be like that sometimes.”

It’s a catch-all phrase that seems to make sense in almost any situation for Sacramento this season.

Blow an 18-point third-quarter lead?

“It be like that sometimes.”

Two fouls by veterans players on 3-point attempts in the final 15.9 seconds?

“It be like that sometimes.”

Hield making six free throws in the final 15.2 seconds of a must-win game, including one that looked like it wanted to hop out?

“It be like that sometimes.”

Coming out of the All-Star break, the Kings have the slimmest hope of climbing back into the postseason chase. A win over the Grizzlies on Thursday and the Kings could climb to within six games of the eighth seed with 27 games remaining.

But a loss at home to Memphis would likely have been a death blow to their chances and put them eight games out of the race.

It wasn’t pretty and it took nearly 2 1/2 hours to work out the details, but the Kings survived a late barrage from the Grizzlies to come away with a 129-125 win.

A big fourth quarter from rookie Ja Morant and some timely scoring from De’Anthony Melton helped the Grizzlies make a game of it.

With 27.7 seconds remaining, the Kings took a nine-point lead. 20.2 seconds later, the lead was down to one. Missed free throws, inexplicable fouls and defensive lapses by the Kings opened a door for the Grizzlies.

Hield’s heroics at the line were the only thing standing between the Kings and a horribly embarrassing, soul-crushing loss.

“As a team, I don’t think anyone’s going up there being nervous,” De’Aaron Fox said. “Sometimes we just haven’t been making them and Buddy came in and saved us tonight.”

Fox, who scored 26 for the game, missed four out of six free throws in the fourth. Three of those misses came as the Grizzlies were surging in the final minute.

Harry Giles, an 81-percent shooter from the stripe, hit one of two from the line in the final 30 seconds, as well. For a moment, it felt like the walls were closing on the Kings.

Compounding the misses at the line, Harrison Barnes and Kent Bazemore both fouled 3-point shooters in a span of eight seconds inside of 16 seconds left to play. Barnes’ foul was highly questionable and likely will be a late addition to the NBA’s Last Two Minute Report on Friday.

In the end, the Kings held on for the win, but those mistakes aren’t something that can be repeated when the margin for error is so slim.

“Collectively, the little details, our communication, our rebounding, things like that, even as you saw tonight, there’s a lot of room for improvement,” Barnes said following the game.

The Kings know what the standings look like and they know how important every game is at this point in the season.

“We just got to chip away, lock in extra hard at this point because every game is critical,” Giles said. “Every game is always critical, but we put ourselves in a position where we can’t really afford to lose games.”

While mistakes were made, there were also plenty of positives. Barnes hit his first seven 3-point attempts and finished with a season-high 32 points. Bazemore was a force on both ends of the court, scoring 18 points in 23 minutes of action.

Fox was aggressive on the defensive end and outplayed Morant, and Giles made three tremendous, game-altering defensive plays late before picking up his sixth foul. His two blocks and a charge drew “Harry, Harry, Harry!” chants from the crowd.

“Three stops wins the game,” Giles said. “That’s what we do in practice and stuff and I just try to translate that.”

It could have been an easier win, but the Grizzlies are 28-27 on the season for a reason. They play hard for 48 minutes, much like the Kings did last year when they won a shocking 39 games.

[RELATED: Bagley sees foot specialist, out at least three more weeks]

Sacramento is focused on one game at a time. The team knows that it’s too early or maybe too late to talk about the playoffs, but it is trying to finish the season strong. Despite all of the craziness in the closing minutes, the Kings found a way to beat the Grizzlies in a must-win game.

“It be like that sometimes.”