SAN ANTONIO — Dwyane Wade was upset, ecstatic, tenacious and gracious in his final battle with the San Antonio Spurs.

It was the perfect ending to Wade's fiery showdowns with San Antonio, albeit an unusual one with the fans serenading him with cheers as he walked off the AT&T Center court after one final win over the Spurs.

Goran Dragic had 22 points and the Miami Heat snapped the Spurs' nine-game winning streak with a 110-105 victory Wednesday night, sending Wade home a winner in what was likely his final game in San Antonio.

"We're playing as good as a group together as we've played since I got back here," Wade said. "It's fun playing basketball with these guys this way."

Dion Waiters added 18 points and Josh Richardson had 15 for Miami, which won its third straight game to remain eighth in the Eastern Conference.

San Antonio saw its 11-game home winning streak come to an end but remained fifth in the West. It was the Spurs' first loss since Feb. 25 in Brooklyn as part of their 1-7 Rodeo Road Trip.

Wade, who is retiring after 16 seasons, has been honoured in his final game at visiting arenas. This one was special, though, given his history against the Spurs, coach Gregg Popovich and their vaunted Big Three of Tim Duncan, Tony Parker and Manu Ginobili.

Wade was key to the battles between Miami and San Antonio in the 2013 and 2014 NBA Finals. The Heat rallied from a six-point deficit in the final 20.3 seconds to force overtime and win Game 6 on their way to capturing the 2013 championship. San Antonio won the title the following season against Miami to avenge that defeat.

The Spurs honoured Wade before the game with a 1 1/2-minute video, including their tussles in the NBA Finals. After the video played, Popovich presented Wade with a gift box that included signed jerseys from Duncan, Parker and Ginobili.

"That's dope," Wade said. "I didn't know it was going to be before the game. I like the music swag they had on it and the videos they put up. It was really cool. I'm so thankful and I'm so appreciative. I don't expect those things to happen to me at all. I just came out and did my job every night and I'm thankful for the relationships that I have. I have a great one with Coach (Popovich) and I just appreciate what they did."

San Antonio also gifted Miami the first half, falling behind by as many as 17 points.

The Spurs rallied from a 12-point deficit entering the fourth quarter to pull to 108-105 on Rudy Gay's floater with 1:07 remaining, but a turnover by DeMar DeRozan and a pair of free throws by Kelly Olynk sealed the victory.

"We had a shot in the fourth quarter, but for three quarters they whipped us physically and discipline-wise," Popovich said. "They deserve the win for that reason."

The Spurs had six players in double figures, but only two starters. LaMarcus Aldridge scored 17 points and DeRozan added 16. Patty Mills and Marco Belinelli added 17 apiece.

San Antonio held opponents to 101.3 points per game during its winning streak but Miami reached 100 with 9 minutes remaining.

DeRozan was given a technical foul after screaming at an official for not calling a foul when he was stripped by James Johnson on the baseline with the Spurs trailing 103-98 with 4:12 to play.

Wade picked up a technical 2 minutes later after berating an official for a non-call on his missed fadeaway over Mills. Aldridge's free throw pared Miami's lead to 106-103.

Wade responded by banking in an off-balance, fadeaway, left-handed runner.

"A shot I've never seen him practice or ever attempt," Miami coach Erik Spoelstra said, still in disbelief, "I guess sometimes that's what great players can do, just manufacture something out of absolutely nothing. He was bottled up, Aldridge just had him jammed and that just gave us the breathing room at the end."

Wade finished with 11 points, including a running 3-pointer from halfcourt that brought the crowd to its feet in celebration of one of the Spurs' fiercest competitors.

HALL OF FAME SWAG

Wade couldn't wait to open the gift the Spurs gave him, which included signed jerseys from Duncan, Parker and Ginobili.

"Legends," Wade said. "Hall of Famer jerseys in those boxes with the Big Three here in San Antonio. Guys I have so much respect for with Duncan, Ginobili and Parker. I appreciate those jerseys."

Wade also exchanged jerseys with DeRozan at halfcourt following the game. The crowd serenaded him with "D-Wade" chants as he did a postgame interview and as he walked into the locker room.

"It's an honour," DeRozan said of Wade's gift. "It was an honour being able to play against him for 10 years of my career, especially me being in the East all those years."

TIP-INS

Heat: Miami's previous win at San Antonio was March 31, 2013, when Chris Bosh scored 23 points, including the game-winning 3-pointer, to stun the Spurs 88-86 as Wade and LeBron James sat out for rest. ... Miami is 17-16 on the road after finishing 18-23 last season. ... Justise Winslow missed the game with a bruised right thigh.

Spurs: Mills played in his 521st game with the Spurs to move past Danny Green into the top 10 in franchise history for games played. Bruce Bowen is ninth with 630 games played for San Antonio. ... Marco Belinelli became the 11th player in NBA history with 400 3-pointers off the bench.

UP NEXT

Heat: At the Milwaukee Bucks on Friday night.

Spurs: At the Houston Rockets on Friday night.

___

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP_Sports