BOSTON -- Paul Pierce had never gone scoreless in a game at TD Garden during his 18-year NBA career. And he wasn't about to let that change during his final visit to Boston.

After getting subbed back in to a raucous ovation with 19.8 seconds remaining in the fourth quarter, Pierce hit a 3-pointer over Isaiah Thomas as Boston fans went delirious for a storybook ending to Pierce's last game at the Garden.

The Celtics emerged with a 107-102 triumph.

"I'm glad I ended it that way," said Pierce, who had been on the bench after playing the first five minutes as a starter. "At least I can say I put one last bucket in."

Paul Pierce said it was "an honor" to get the start for the Clippers in the final NBA game he will play in Boston. Brian Babineau/NBAE/Getty Images

Clippers coach Doc Rivers, who did his best to ignore the Garden fans that chanted relentlessly for Pierce's return throughout the second half, could only marvel at the finish.

"That only happens here [in Boston]," said Rivers. "For Paul, that was perfect."

Pierce, 39, has said he will retire after the season. He hadn't played since Dec. 31 and has appeared in just 12 games this season for the Clippers. The forward played the first 15 years of his career with the Celtics and is the franchise's second-leading scorer behind John Havlicek.

Rivers said it was important for Pierce to start Sunday's game, and his teammates agreed.

"I went to the team first and asked, and they looked at me like, 'What a dumb question.' But I thought it was the appropriate question for them," Rivers said. "They wanted him to start, which I thought was great. Then I went to Paul and he was actually hesitant about it. He wasn't sure if he should. Then he said, 'OK.' Then we made him practice yesterday, which is tough for him."

Pierce appreciated the opportunity to start in Boston.

"It's feels great. You know, I'm glad Doc was able to get me out there one last time, knowing that this would be my last game as a player in the Boston Garden," Pierce said. "So it's an honor. You know, [18] years ago today was my first game as a starter, and I'm ending that off in 2017 as a starter in the Boston Garden, ending my career, last game here on the same day, which is pretty ironic."

The Associated Press contributed to this report.