SAN ANTONIO — Manu Ginobili hit a 3-pointer with 5 seconds remaining and the San Antonio Spurs overcame Kyrie Irving’s 36-point effort to beat Boston 105-102 on Friday night, snapping the Celtics’ four-game winning streak.

Ginobili set up the winning basket by sneaking into the paint for an offensive rebound with 25 seconds left.

LaMarcus Aldridge had 27 points and 10 rebounds for San Antonio.

Irving, who scored a career-high 57 points against San Antonio in 2015 while with Cleveland, created havoc again at the AT&T Center. Irving finished 13 for 21, including 6 for 10 on 3-pointers, but missed his final two 3s. His final 3-pointer rattled in and out as the buzzer sounded.

The Spurs, already without Kawhi Leonard and Kyle Anderson, lost Danny Green in the first half. Green left with tightness in his left groin. There was no update on the severity of the injury.

Pau Gasol had 14 points and 11 rebounds, Rudy Gay had 15 points, and Tony Parker added 11 for the Spurs. The Spurs are undefeated with Parker in the lineup through six games.

San Antonio held Boston to one field goal in the opening four minutes of the final quarter to erase a five-point deficit to set up the last-second dramatics.

Jayson Tatum had 20 points, and Jaylen Brown added 15 for the Celtics.

Boston scored the game’s first 11 points, prompting San Antonio Coach Gregg Popovich to call a timeout and make mass substitutions during the run. Irving hit two more 3-pointers after the initial run, and Popovich drew a technical foul.

The Spurs’ first lead came on a fallaway 3-pointer by Ginobili at the close of the first half for a 56-55 advantage.

Brown had 10 points in the third, including two monstrous dunks late in the quarter that awed the crowd.

NOTES: Celtics forward Marcus Morris was listed as questionable while rehabilitating his left knee, but felt comfortable enough during pregame warm-ups to play. Morris finished with five points in 25 minutes after being listed. … Boston suffered its first loss to a Western Conference after winning eight straight. … The Celtics are 10-3 on the road, trailing only Houston (11-1) and Golden State (11-3) for the league’s best road record.

Comments are not available on this story.