San Antonio Spurs guard Patty Mills (8) controls the ball as Miami Heat forward Rodney McGruder defends during the first half of an NBA basketball gam

MIAMI (AP) — Hassan Whiteside had 29 points, 20 rebounds and an NBA season-high nine blocked shots, and the Miami Heat snapped a four-year drought against San Antonio by beating the Spurs 95-88 on Wednesday night.

Wayne Ellington scored 20 points and Justise Winslow added 16 for the Heat, who had dropped their last nine regular-season games to the Spurs — and 11 consecutive games overall in the series, when factoring in the 2014 NBA Finals.

Josh Richardson added 14 for the Heat, who were down to an eight-man rotation for the second half because of injuries and Dwyane Wade missing the game for personal reasons.

Patty Mills came off the bench to score 20 for San Antonio, which dropped its second straight. Davis Bertans scored 19 and DeMar DeRozan added 18 for the Spurs, who had a 50-12 edge in bench scoring.

The Spurs' starters shot 13 for 45 from the floor and finished with 38 points. LaMarcus Aldridge was limited to six points on 2-for-14 shooting.

Bryn Forbes had a chance to get San Antonio within two with about 30 seconds left, but his 3-pointer missed, Whiteside grabbed his 20th rebound and the Heat held on.

Whiteside had played against the Spurs five times previously, and the Heat lost all of them. He's now been part of at least one win against 29 NBA clubs — with Miami the lone exception. Whiteside played against the Heat only once, a game that Sacramento lost in 2012. He played for 1:27 of that game.

The Spurs led only twice, at 2-0 and 4-2. Miami had a 15-0 run in the opening minutes to take the lead, the biggest stretch of unanswered points against San Antonio so far this season. The Spurs had given up 11-0 runs in three other games, but nothing that got past that.

And even though the lead seemed tenuous several times — San Antonio got within three or four points on four occasions in the second quarter, and cut Miami's lead to five early in the third — the Heat kept finding ways to get out of trouble.

Ellington's 31-footer late in the third helped Miami take a 75-64 lead into the final quarter, and he made a pair of 3s in a 27-second span to push the Heat lead to 85-66 with 10:09 left.

TIP-INS

Spurs: Derrick White (heel) made his season debut, started the game, and played 10 scoreless first-half minutes. Mills started the second half in his spot. ... Down 15-4, the Spurs subbed all five starters out simultaneously just 4:22 into the game. ... San Antonio's 42 first-half points were a season-low. The Spurs' previous halftime low was 50, and they came into Wednesday averaging 55.6 points at intermission.

Heat: Richardson missed his first eight shots and finished 6 for 22. ... Ellington started and played 37 minutes after logging only 12 minutes in his lone two appearances of the season entering Wednesday. He missed the start of the season with ankle soreness. ... Whiteside was one block shy of what would have been his fifth triple-double.

COLD SHOOTING

The Heat won despite shooting 39 percent. The Spurs shot 33 percent, and a most-uncharacteristic 29 percent from 2-point range.

MANY MISSING

Besides Wade, Miami was also without point guard Goran Dragic (right knee inflammation), Dion Waiters and James Johnson (recovering from surgeries), and Derrick Jones Jr. was ruled out at halftime with a bruised right knee. The Spurs were without Rudy Gay (right heel soreness), Pau Gasol (right foot soreness) and former Miami Hurricane standout Lonnie Walker IV (recovering from knee surgery).

EIGHT WAS ENOUGH

Whiteside had eight blocked shots in the first half. That was a Heat record for any half; the previous first-half mark was seven by Alonzo Mourning in 1999, and the second-half mark is seven by Whiteside — which he's done twice, most recently in 2016.