The Clippers’ Paul Pierce kisses the Celtics logo after his final game in Boston. (Steven Senne/Associated Press)

Normally, when a superstar player announces at the start of the season that it will be his last, he receives a slew of retirement gifts. That did happen for Paul Pierce, but on Tuesday, the longtime former Celtic was happy to joke that he had given his old squad quite the farewell present on his way out the NBA door: the top pick in the draft.

Pierce posted the tweet just after if was confirmed on national TV that the Celtics had, indeed, snared the No. 1 spot in June’s draft. The pick originally belonged to the Nets, but Boston was able to acquire it in a 2013 trade that has paid off enormously well for the Celtics.

In that deal, Boston traded Pierce, Kevin Garnett and Jason Terry to Brooklyn for five players (Gerald Wallace, Kris Humphries, MarShon Brooks, Keith Bogans and Kris Joseph), and, most importantly, first-round picks, in 2014, 2016 and 2018 (the NBA has a rule barring teams from trading first-round picks in consecutive years). Oh, and the Celtics also wrangled from the Nets the option to swap first-round picks in 2017, a move that set them up for a celebration Tuesday, after Brooklyn finished with the league’s worst record.

At the time of the trade, the Nets had just enjoyed a successful first season in Brooklyn after moving from New Jersey, and owner Mikhail Prokhorov wanted to make a bigger splash. Management felt that adding Pierce and Garnett to a nucleus of Deron Williams, Joe Johnson and Brook Lopez could make the team a title contender — or at least turn it into the hottest ticket in town — but it all quickly fell apart.

The Nets did reach the second round of the playoffs in 2013-14, but Pierce and Garnett, at 36 and 37, respectively, both showed their age, averaging career lows in several major statistical categories. Pierce had been in the final year of his contract, and the Nets let him move on to the Wizards in free agency, then they traded Garnett to the Timberwolves the next season.

Williams, whose own play had been sharply declining, was let go soon after, and by 2015-16, the Nets were in an organizational free-fall, with an awful draft-position outlook to boot. Presumably, Tuesday won’t even represent the final lottery insult, given that, as mentioned, the Celtics own Brooklyn’s 2018 first-round pick.

Boston, by contrast, rebuilt quickly following the 2013 trade and now is in the stunning position of having gained the No. 1 pick a day after making the Eastern Conference finals. Regardless of how the rest of the postseason plays out, the Celtics are set up strongly for the future, particularly if they don’t miss with their choice of what is widely considered a deep crop of talent this year.

Before the season, Pierce, who began his career with 15 years in Boston and ended it with two in Los Angeles (with the Clippers), said that he eventually wanted to sign a one-day contract with the Celtics, so that he could retire as a member of the team with which he went to 10 all-star games and won an NBA title. That seems like the least the Celtics could do for him, considering all he’s done for them.