With the NBA title on the line, Tim Duncan and the San Antonio Spurs proved themselves worthy champions.

Duncan came up huge in the second half and was chosen finals MVP after having the worst playoff series of his career, and Manu Ginobili had another breakthrough performance Thursday night to lead the Spurs past the Detroit Pistons 81-74 in a Game 7 that was as thrilling as it was rare.

In a matchup of the past two NBA champions, the Spurs came through in the clutch to win their third title in seven years and deny Detroit the chance to repeat.

The Spurs are certainly not a dynasty, but their staying power as a championship caliber team helps validate a legacy that history will revere with an added measure of respect.

Duncan had 25 points and 11 rebounds while shrugging off a stretch of eight straight misses that ended in the third quarter with the teams tied. Ginobili scored 23 points with a series of slashing, scintillating drives and big passes.

Behind Duncan, the stoic established star, and Ginobili, the flashy young Argentine, the first Game 7 in more than a decade ended with the Spurs celebrating on their home court as silver and black confetti streamed down from the rafters.

“We just played a great team. I don’t know how the hell we did it, but I am thrilled,” Spurs coach Gregg Popovich said after embracing his good friend, Detroit coach Larry Brown, as the game ended. Popovich became the third coach with three titles, while Brown headed into an uncertain future still stuck on one.

“I’m just as proud this year as I was last year,” said Brown, whose team recovered from two early blowout losses and dictated the series for four straight games before San Antonio — and especially Duncan — reasserted itself at the end.

The NBA had waited a long time for a game with so much at stake and so little room for error. And the difference came in the fourth quarter, when the Spurs were able to make the plays the Pistons couldn’t.