SAN FRANCISCO — The emotional toll of one of the longest weeks in recent franchise history led Lakers coach JJ Redick to take a step back while assessing the goal at hand.

“You feel a certain way when you’re playing great basketball and you feel that you can beat anyone,” Redick said Tuesday, alluding to their 15-2 record in March. “And then there’s the emotion of getting your butt kicked and losing Luka (Doncic) and Austin (Reaves).”

Redick spent Wednesday and the time before the Lakers’ 119-103 victory over the Golden State Warriors on Thursday night, talking to his coaching staff and players. He said he likely “overlooked” the emotions attached to losing Doncic and Reaves to injuries for at least the rest of the regular season and the reality of losing three consecutive games in relatively non-competitive fashion.

Tuesday was a return to winning, as the Lakers held on to the fourth seed in the Western Conference for at least another day by relying on LeBron James and a host of players who had struggled since the team’s season was flipped on its head.

James led all players with 26 points on 11-of-17 shooting to go with 11 assists and eight rebounds as the only star on the court. He exited briefly after appearing to jam his hand while blocking a shot by Pat Spencer midway through the third quarter.

Center Deandre Ayton had 21 points on 9-of-11 shooting to go with five rebounds, while Jake LaRavia added 16 points – and made four 3-pointers for the first time since a Jan. 7 game against the San Antonio Spurs.

James cut through the short-handed Warriors throughout the fourth quarter as the Lakers pulled away, leading by as much as 27 points. The 41-year-old burst ahead for a pair of layups and hammered home a one-handed dunk before the Chase Center crowd dispersed after he took a seat for the night.

The Lakers (51-29) have had a rough go of it with injuries, especially lately, but the Warriors (37-43) rival any team in the NBA for depth woes this season.

Two-time league MVP Steph Curry just returned from a two-month injury stint and did not play Tuesday as Golden State manages his recovery before attempting to reach a first-round playoff series through next week’s four-team Play-In Tournament. The Warriors’ pregame injury report was a laundry list of impact players: Kristaps Porzingis, Al Horford and Moses Moody, along with All-Star Jimmy Butler, who has been out since January after tearing his ACL. They used their 41st different starting lineup on Thursday.

Warriors guard LJ Cryer even had to exit in the fourth quarter after landing on Lakers forward Jarred Vanderbilt during a layup attempt, hopping toward a table in the home tunnel as he struggled to put weight on his right foot.

Vanderbilt, who verbally tussled with Redick on Tuesday after playing just five minutes and receiving an early hook in the second quarter, played a team-high 25 minutes off the bench, contributing six rebounds and five assists. Redick said before the game that he had discussed the incident with Vanderbilt since Tuesday’s loss, adding that he “felt good” about their interactions.

During the second half of Thursday’s victory, Redick gave guard Nick Smith Jr. 11 minutes off the bench and he scored nine points on 3-for-4 shooting from 3-point range. Smith was one of 13 Lakers to get in the game, as Redick continues to assess who can help fill out playoff rotations. Rookie forward Adou Thiero played six minutes, while backup big man Drew Timme logged eight minutes.

Guard Brandin Podziemski and forward Nate Williams each had 17 points to pace Golden State, which shot 50.6% from the field. The Lakers shot 16 for 29 from 3-point range, while the Warriors made just 9 for 30 from behind the arc.

The Lakers (51-29) and Houston Rockets (51-29) remain tied with two games left in the regular season, with the third-place Denver Nuggets (52-28) a game ahead of both teams. The Lakers own the head-to-head tiebreakers vs. both teams.

Seeds 3-5 are about all that remain unsettled in the West. The Lakers finish their slate with home games against seventh-place Phoenix on Friday and Utah on Sunday. Denver hosts first-place Oklahoma City on Friday and plays at second-place San Antonio on Sunday, though neither the Thunder nor Spurs have anything left to play for. The Rockets have home games against sixth-place Minnesota on Friday and Memphis on Sunday.

More to come on this story.