Kevin Durant scored 22 points and rattled in the go-ahead basket on a baseline runner with 18 seconds left, and the Oklahoma City Thunder scored the final nine points to rally for a 77-75 victory over the Los Angeles Lakers in Game 2 of the best-of-seven Western Conference semifinal series on Wednesday night.

Oklahoma City trailed by seven with 2 minutes left before surging back with a series of defensive stops by its stars to take a 2-0 lead.

Game 3 is Friday night in Los Angeles.

Kobe Bryant and Andrew Bynum scored 20 points apiece for the Lakers, who came up empty on their last six possessions after Bynum’s hook shot made it 75-68 with 2:09 remaining.

After struggling throughout the second half, the Thunder suddenly came alive after Scott Brooks called timeout after Bynum’s basket that gave Los Angeles its largest lead of the game.

James Harden drove for a layup before Durant used his height advantage to reach up and tip away a pass from Bryant, who he was guarding. Durant ran out for a right-handed dunk at the other end before Russell Westbrook forced another turnover by aggressively challenging an outlet pass to Bryant along the sideline.

Harden made the next stop, blocking Bryant’s jumper on the next Lakers possession and getting a layup in transition to cut the deficit to one in the final minute.

Bryant couldn’t connect again, this time on a 3-pointer, to give the Thunder the ball back with the chance to take the lead and Durant was able to make it happen.

Steve Blake missed a 3-pointer from the right side with about 5 seconds left after Metta World Peace couldn’t get the ball to Bryant on the inbounds play. Durant was then fouled with 0.3 seconds left and made his first try before missing the second on purpose — failing to hit the backboard or rim for a violation.

The Lakers got a desperation try but World Peace’s long pass for Bynum was intercepted by Harden.

Westbrook added 15 points for Oklahoma City, which matched its lowest scoring total of the season but still won.

Historically, the loss makes a huge difference. Los Angeles is 29-12 when splitting the first two games of a seven-game series and has lost 17 of 19 when falling into a 2-0 hole. The Lakers’ last comeback was in the 2004 West semifinals against San Antonio.