CNN  — 

LeBron James hit a game-winning shot with 58 seconds left on the clock as the LA Lakers beat the Golden State Warriors 103-100 to advance to the Western Conference playoffs.

With two of the NBA’s in-form teams facing off in the NBA’s play-in tournament, James’ 34-foot three-pointer settled the game, handing the defending champions a spot in the playoffs against the No. 2 seed Phoenix Suns.

The Warriors, meanwhile, will have to beat the Memphis Grizzlies in order to take the final spot in the Western Conference playoffs.

James said his winning bucket was made more difficult having just been poked in the eye by Draymond Green.

“After Draymond’s finger to the eye, I was literally seeing three rims out there so I just shot at the middle one,” said James, who finished the game with a triple double – 22 points, 10 assists and 11 rebounds.

“With the grace of the man above, I was able to knock it down.”

LeBron James scores his game-winning shot at Staples Center.

Looking on as the shot sailed over his head was the Warriors’ Steph Curry, who scored a game-high 37 points in his team’s loss.

“It was a great shot,” said Curry.

“That’s a tough one, because you don’t really expect it to go in. You expect us to get the rebound, come down in transition, and have a possession to take the lead. But everything changes when it goes in. All-time great players make great shots. That’s what happens.”

Visit CNN.com/sport for more news, videos and features

The Warriors had led 55-42 at halftime, but the Lakers rallied in the third quarter, outscoring Golden State 35-24.

Anthony Davis then scored 13 of the Lakers’ 26 points in the fourth quarter, leading the team on the night with 25.

Curry scored 37 points in the Warriors' loss against the Lakers.

The Warriors will now play the Grizzlies for the second time in a week after their 113-101 victory on Sunday.

The winner of Friday’s game will advance to the playoffs to face the No. 1 seed Utah Jazz, while the loser’s season will come to an end.

“Our guys really, really just battled and competed, and I couldn’t be more proud of the team for what they’ve become over the last couple of months,” Warriors head coach Steve Kerr told reporters after Wednesday’s game.

“But this is a bitter pill to swallow. This was our game and we couldn’t get it done.”