LeBron James’ go-ahead three-pointer helped the Los Angeles Lakers defeat the Golden State Warriors in the play-in tournament to advance to the NBA playoffs on Wednesday night.

James hit the 34-foot shot as the shot clock was winding down and with 58.2 seconds remaining in the game to give the Lakers a 103-100 lead. The Lakers would win by the same score.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Just moments prior to the big shot, James was poked in the eye by Warriors forward Draymond Green and was down for a brief moment. He would tie the game with a made foul shot. He said he aimed for the "middle" rim on the game-winning shot as he was battling an eye issue after the hard foul.

James didn’t have the best performance of his career as he battled an ankle injury. He still put up a triple-double finishing with 22 points, 11 rebounds and 10 assists.

GRIZZLIES END SPURS' SEASON IN PLAY-IN GAME WINNING 100-96

Anthony Davis led Lakers scorers with 25 points. He added 12 rebounds and two assists. Alex Caruso was efficient off the bench, recording 14 points on 6-of-12 shooting.

Golden State led at halftime 55-42. However, the Warriors had 20 turnovers in the game with most of them coming in the second half. It contributed to their downfall.

Stephen Curry led all scorers with 37 points and seven rebounds. He was 12-for-23 from the field overall and 6-of-9 from three-point range. Andrew Wiggins added 21 points. Jordan Poole had 10 off the bench.

The defending-champion Lakers advance to the playoffs as the No. 7 seed in the Western Conference. The team will start a seven-game series against the Phoenix Suns on Sunday.

CLICK HERE TO GET THE FOX NEWS APP

The Warriors are still fighting for their playoff lives. The team takes on the Memphis Grizzlies on Friday night to determine the final seed of the playoffs.