Stephen Curry scored 40 points and Kevin Durant 34 to power a stunning second-half comeback that lifted Golden State over San Antonio 113-111 Sunday in an NBA playoff thriller.

The Spurs squandered a 25-point lead and might have lost star forward Kawhi Leonard, who left the game for good with a sprained left ankle early in the third quarter.

Golden State seized a 1-0 edge in the best-of-seven Western Conference final, which continues Tuesday in Oakland. The winner plays defending champion Cleveland, Boston or Washington in the NBA Finals.

“We just controled what we could control and played smarter,” Curry said. “It’s the playoffs. You’ve got to take a win any way you can get it.”

Curry credited the reversal of fortunes in the dying minutes to “aggressiveness, paying attention to details and obviously we’ve got to make shots.”

The much-anticipated matchup between the most productive NBA scoring attack of Golden State, which led the league with 67 wins, and the top NBA defense of the Spurs, next best at 61 wins, met high expectations.

Kawhi Leonard scored 18 of his 26 points in the first half and LaMarcus Aldridge added 17 of his 28 in the opening two quarters as the Spurs seized a 62-42 half-time lead.

But Leonard left the contest for good with 7:53 to play in the third quarter, limping to the locker room with a left ankle sprain.

“Just very painful because I tweaked it before,” Leonard said. “It’s hard to tell (about Tuesday). I definitely couldn’t go (the rest of Sunday’s game). But we’ll see how I get better each day.”

Leonard is expected to undergo an MRI on Monday and his status for game two is questionable.

The Warriors responded by scoring the next 18 points, pulling within 78-73 on Durant’s fast break slam dunk.

“We were smart when we got out and pushed the basketball. We were disciplined when we ran,” said Warriors assistant coach Mike Brown, guiding the team in place of idled coach Steve Kerr.

The Warriors were given a half-time pep talk by Kerr, who has given way to Brown since the second playoff game due to complications from back surgery.

Curry scored 19 points in the third quarter to ignite the fightback, going 5-of-6 from 3-point range, but the Warriors still trailed 90-81 entering the fourth quarter, Curry being treated on the bench for a right arm issue.

Heroics by Durant, Curry

Two Durant 3-pointers and a dunk trimmed the Spurs’ lead to 96-93. And after two baskets by Shaun Livingston and some Spurs misses, Durant’ dunk with 4:09 remaining put Golden State ahead 101-100, their first lead since 8-7 in the opening minutes.

Draymond Green’s three-point play put the Warriors ahead 109-106 and after an Aldridge miss, Curry made a driving layup to lift the Warriors ahead 111-106.

Argentina’s Manu Ginobili responded with a dunk for the Spurs and Australian Patty Mills, starting in place of injured Tony Parker, made a steal and two key free throws to pull San Antonio within 111-100.

Curry made a shot over Aldridge for the final Warrior points and a 113-110 edge, Aldridge missed a tying 3-pointer but Mills was fouled with a half-second remaining. He made the first free throw but missed the second, hoping for a game-tying tip in basket.

Instead, the Warriors swatted away the ball and the clock expired.

We had to “be aggressive and be decisive,” Curry said. “In the first half we were trying to do too much. We weren’t willing to take ugly shots. I got it going in the third, KD got it done in the fourth, everybody contributed and we got it done.”