MEMPHIS, Tenn. — De’Aaron Fox didn’t decide until shortly before game time that he would play against the Memphis Grizzlies. His appearance moved the Sacramento Kings closer to the playoffs.

Fox, who sat out Thursday’s loss at Oklahoma City with lower right abdominal tightness, scored 25 points, including 16 after halftime, and the Kings beat Memphis 104-101 on Friday night.

Harry Giles III added 16 for the Kings, who moved within three games of Memphis, handing the Grizzlies their fifth straight loss. Meanwhile, New Orleans, which beat Cleveland on Friday night, is within two games of Memphis for eighth place in the West.

“I felt fine,” said Fox, who also is dealing with a shoulder injury. “When you are in the thick of things, you are not really thinking about it.”

But coach Luke Walton wasn’t sure he would see his second-leading scorer at 19.9 points a game. Walton saw Fox Thursday, and “he wasn’t moving so good.” Walton focused his game plan on Fox not playing. Only after the guard tested the injuries in pregame warm-ups did he decide to give it a go.

“It’s important for us right now,” Walton said of Friday’s win. “They are all important, but this one, to kind of finish off a good road trip, he showed a lot of leadership, and then went out and played at a high level.”

The victory, the Kings fourth in five games since the All-Star break, came despite a season-high 32 points from Memphis forward Dillon Brooks along with 13 points and a career-high 25 rebounds for Jonas Valanciunas. Ja Morant had 20 points and 11 assists for Memphis, which has struggled since the break with the loss of starter Jaren Jackson Jr. and key reserve Brandon Clarke to injuries.

“I feel like it is good pressure,” Brooks said of the losing streak in the midst of the playoff hunt. “We were playing well, but we’ve hit a big adversity like this. …We’re hitting it now, and we’re being tested.”

The Kings led by as many as 10 early in the fourth quarter. And despite a furious Memphis rally down the stretch, Sacramento held on for its fourth win in the last five since the All-Star break.

Memphis trailed by nine – 100-91 -- on a 3-pointer from Fox with 2:47 remaining. Memphis would craft a 10-2 run capped by a three-point play from Morant with 10.2 seconds left and a 102-101 Sacramento lead.

Buddy Hield, who had 14 points, converted a pair of free throws with 4.4 left and a 3-point attempt from Memphis guard Tyus Jones as time ran out bounced off the rim.

“The guys are finding a way. Unfortunately, it didn’t lead to a win,” Memphis coach Taylor Jenkins said.

TIP-INS

Kings: Wrapped up a four-game trip. ... Kent Bazemore would finish with 13 points. … Nemanja Bjelica also had 13 points and 11 rebounds. …Committed only nine turnovers, the fifth time Sacramento has recorded single digits in that category. …Fox has reached at least 20 points in each of the last four games he’s played.

Grizzlies: Signed F Jarrod Uthoff to a 10-day contract on Thursday. Uthoff was with the Memphis Hustle of the G League. He did not play Friday. … Brooks’ previous high this season was 31 twice, the last time on Jan. 20 against the Pelicans. … Valanciunas previous career high in rebounds was 24 against Orlando last season.

FOX’S SHOULDER

In addition to the abdomen problem, Fox also is dealing with a bum right shoulder. “With that one, it’s on my shooting arm. It’s something that you move around a lot and get hit with a lot of screens. It’s something that I feel most of the game, but I think I played pretty well, so it’s alright.”

TIE-BREAKER

The Kings won the season series 3-1 over Memphis, so Sacramento would hold that tie-breaker if the teams were deadlocked for the final playoff spot. All four games in the series were decided by five points or less.

UP NEXT

Kings: Host Detroit on Sunday.

Grizzlies: Host the Los Angeles Lakers on Saturday night.

More AP NBA: https://apnews.com/tag/NBA and https://twitter.com/AP_Sports