SAN ANTONIO — Stephen Curry poured in 37 points, 16 of them in a pivotal stretch of the third quarter, as the Golden State Warriors remained on track to set the NBA’s single-season win record with a 92-86 victory over the San Antonio Spurs on Sunday night.

The Warriors (72-9) matched the victory total of the 1995-96 Chicago Bulls. Golden State can set the record with a home win over the Memphis Grizzlies on Wednesday, the season’s final night.

A nip-and-tuck game between the teams with the league’s two best records turned in the first six minutes of the fourth quarter. Warriors forward Harrison Barnes had three big baskets and led a group of mostly reserves to a six-point lead over a mixture of San Antonio’s starters and bench players.

From there, Curry and Klay Thompson took over as Golden State turned a four-point lead into a 90-79 advantage on Curry’s finger-roll layup with 1:34 to play. San Antonio cut the Warriors’ lead to four points in the waning seconds but could not complete the comeback.

Golden State handed the Spurs their first home loss of the season and ended San Antonio’s franchise-high, 48-game regular-season home winning streak that began on March 12, 2015. The Spurs’ streak is the second longest in NBA history, right after the Warriors’ mark of 54 consecutive home wins that ended last month.

The Warriors also ended their streak of 33 consecutive regular-season defeats at San Antonio. Golden State’s last regular-season win in the Alamo City was a 108-94 victory on Feb. 14, 1997.

Thompson added 14 points for the Warriors, while Draymond Green hit for 11 points.

The Spurs (65-15) were led by LaMarcus Aldridge’s 24 points and Kawhi Leonard’s 20 points and 13 rebounds. David West and Aldridge each pulled down 10 rebounds.

San Antonio held a 19-14 lead after the end of a raucous first quarter. The Spurs outrebounded Golden State 18-11 in the quarter, 6-3 on the offensive boards, which created five second-chance points for San Antonio.

The teams fought through tautly played second quarter with the Spurs gaining a seven-point lead twice in the period before Golden State pushed within 31-30 after consecutive 3-pointers by Brandon Rush and Thompson and jumpers by Barnes and Thompson.

Green pumped in a 3-pointer a minute later to tie the game at 33-33, and then Curry picked off a pass from the Spurs’ Danny Green and gave the Warriors a short-lived 35-33 lead. Aldridge responded with a put-back off yet another offensive rebound on San Antonio’s ensuing possession to knot the score at 35-35 at halftime.

The Spurs opened the third quarter with a 10-2 run, punctuated by a Leonard dunk over Andrew Bogut after a strong move to the basket. Golden State answered with back-to-back 3-pointers by Curry that cut the deficit lead to 45-43.

Curry kept shooting and making shots for the rest of the quarter, tallying 16 in the period as the Warriors built a 62-61 lead. The reigning MVP canned a three-quarter court shot at the end of the quarter that was waved off because time had expired.

Barnes had seven points and Marreese Speights added a bucket and two free throws in the first six minutes of the fourth quarter to help keep the Warriors’ in front at 73-69. That was when Thompson and Curry took over, and San Antonio never could make a sustained run through the remainder of the game until it was too late.