Correction: A previous version of this article incorrectly reported that Magic Johnson and Larry Bird played in the NBA Finals in the 1990s.

The rest of the NBA has been waiting for the San Antonio Spurs to go away for several years, counting down the days until Tim Duncan walks away and takes Coach Gregg Popovich with him, anticipating when age and attrition will make this team fade as all dynasties must do.

But somewhere inside Duncan is the competitiveness he had when he first chose shooting at a rickety hoop over hitting the beach in the U.S. Virgin Islands. Duncan is 15 years removed from his first NBA championship and has been around long enough for the Spurs to transition from a boring to beloved brand of basketball that is built around the talents of many instead of the charms of one or three.

The Spurs used their precision execution and selfless style to complete a redemptive run to their fifth NBA championship with a 104-87 victory over the Miami Heat on Sunday.

“For whatever reason, it is sweeter than any other,” Duncan said of his fifth title. “Whether it be because of the time frame, because I’m coming toward the end of my career . . . It’s amazing to think about having done this five times, the kind of company I’m in, the people who have had such amazing careers. To still be in a situation where we can win or I can win another championship is just an amazing blessing, and it’s not taken lightly.”

Learning to evolve and adapt, Duncan has adjusted his game to make room for an exciting but at times erratic shooting guard from Argentina (Manu Ginobili), a slithery point guard from France (Tony Parker) and now a stoic, lithe 22-year-old with cornrows from Riverside, Calif. (Kawhi Leonard). Leonard was named NBA Finals MVP after holding his own against LeBron James and fulfilling the prophecy of Popovich, who before last season proclaimed him the future of the franchise.

The Post Sports Live crew discusses how many more NBA championships LeBron James has to win to be considered one of the greatest basketball players of all time. (Jayne Orenstein/Post Sports Live)

Before the game was even complete, James walked down from his bench to congratulate the Spurs, first embracing Leonard. Leonard scored 22 points, grabbed 10 rebounds and continued his inspired play over the past three games, when the Spurs turned what was expected to be a competitive series into a rout. He became the youngest Finals MVP since Magic Johnson in 1980.

“It just feels like a dream to me,” Leonard said while crediting Duncan’s presence for inspiring him. “Just coming here and seeing him prepare every day and having that drive and will to win at the age he is and after winning all the championships he’s won before I got here just motivated me to go even harder because I’m young.”

The better team defeated the game’s best player, and it set a playoff record with 12 games decided by at least 15 points, including all four wins in this series. If not for four missed free throws in a critical stretch in a Game 2 loss, San Antonio very well could have swept the Heat. The 70-point differential and 52.8 percent shooting from the field in the five-game series both were Finals records.

Duncan joined John Salley as the only players in NBA history to win championships in three different decades, but Duncan’s run is much more remarkable because he continues to make significant contributions. With the arena shaking from exuberant fans bouncing in the bleachers, Popovich embraced Duncan, whispering into his ear while the Prince song “1999” blared from the rafters.

In the seven years since San Antonio last won a championship with a four-game sweep of James and the Cleveland Cavaliers, James has won the league’s MVP award four times and led the Heat to two championships. Miami’s last title came last year at the expense of the Spurs, who squandered two opportunities to claim another title.

After living through 12 months of replays of Ray Allen’s three-pointer from the right corner in Game 6 and Duncan’s missed layup late in Game 7, the Spurs didn’t leave any room for suspense in their first opportunity to close. They withstood an early run from James and the Heat and answered with a more overwhelming response that included a vicious Ginobili jam over Chris Bosh, Duncan abusing Udonis Haslem inside and backup guard Patty Mills hitting three-pointer after three-pointer.

“Last year’s loss was devastating,” Popovich said. “I’ve said many times, a day didn’t go by where I didn’t think about Game 6. For the group to have the fortitude that they showed to get back to this spot I think speaks volumes about how they’re constituted and what kind of fiber they have.”

Duncan wasn’t talking smack when he declared the Spurs would finish what they couldn’t last season. He was confident in what Popovich and General Manager R.C. Buford had built. He was certain his teammates had been hardened from the devastating Finals meltdown and wouldn’t be denied after finishing with the league’s best record and an impressive run through the Western Conference.

The Spurs have pulled off the remarkable feat of rebuilding while remaining a championship contender. In the past three years, San Antonio found value in players no one else in the league wanted (Boris Diaw, Danny Green and Mills) and added the future of the franchise (Leonard) in 2011. Those pieces allowed Duncan, Ginobili and Parker to adapt to diminished roles without losing their effectiveness. So deep, so balanced, the Spurs didn’t get a field goal from Parker until he hit a pull-up jumper with 15 seconds remaining in the third quarter to put the Spurs ahead by 21 points.

“The team was better, the ball movement was incredible, so we didn’t depend on anybody, and I think what happened last year made us stronger,” Ginobili said after scoring 19 points. “It wasn’t about Tim Duncan or Tony Parker. It wasn’t about Kawhi or Danny Green or Boris Diaw. Everybody, this was a team.”

The Heat didn’t exactly win “not three, not four” championships after coming together in controversial fashion in 2010. But Miami did reach four NBA Finals, and going 2-2 can hardly be considered a failure, especially since Larry Bird and Magic Johnson both did the same when they led the Boston Celtics and Los Angeles Lakers, respectively, to four straight Finals trips in the 1980s.

James came out ready to beat the Spurs by himself as he scored 17 of his game-high 31 points in the first quarter and recorded blocks on Duncan and Mills. But in many ways, James often looked all alone, as he did with the Cavaliers in 2007. His all-star teammates — Chris Bosh and Dwyane Wade — combined to score just 24 points. “Tried to inspire my teammates to try to get a win,” James said. “Obviously, I didn’t do enough.

“We’re not discrediting what we were able to accomplish in these four years,” he said. “We lost one, we won two and we lost another one. Take 50 percent in four years in championships any day. Obviously, you want to win all of them, but that’s just the nature of the game.”

The victory comes at a tenuous period for the Heat franchise. James, Wade and Bosh can opt out of their contracts and become free agents this summer.

James’s future will be of the most concern for Heat President Pat Riley, especially after James spent most of the season carrying the team while it attempted to save Wade for the postseason.

Wade helped the Heat get back to the Finals, but the 2006 Finals MVP was a shell of himself. He lacked explosiveness on his drives and missed shots he normally makes. His struggles were encapsulated by a deflating sequence in the third quarter when he attempted to dunk over Spurs reserve Tiago Splitter and had his shot rejected. Wade dropped to the floor, and the Spurs hit three-pointers on three consecutive possessions to take a 65-44 lead.

The day before they claimed their fifth title together, Duncan and Popovich both answered more questions about possibly retiring. Popovich said he still hopes to coach, and in typical Duncan fashion, the aging veteran provided a lengthy response with no definitive answer. The time may have come to just sit back, enjoy and let them walk away when they please.