As Kobe Bryant finishes his last lap around the NBA, 20 years of memories and accolades following him into retirement like a vapor trail, there is one mystery that remains unsolved.

Among his rarest of accomplishments, of course, will be walking off the floor for the last time wearing the same Lakers jersey that he wore when he first came in. In the era of trades, free agency and transaction-mania, nobody does that anymore.

But it's easy to forget just how close Bryant's time with the Lakers came to ending back in 2007. Frustrated with back-to-back first-round exits and driven to distraction by his obsession with proving he could win a championship without Shaquille O'Neal, Bryant rocked the NBA by publicly demanding a trade from the only NBA team he'd ever known.

It was bitter and venomous and ugly. A divorce seemed so inevitable that GM Mitch Kupchak was under orders from the late Dr. Jerry Buss to find a deal for Bryant, no matter how much Buss didn't want to part with him.

The story of Bryant rejecting a trade to the Pistons first trickled out at Buss' 2013 funeral, where Bryant and Kupchak both caused quite a stir when they alluded to it. The storyline has been resurrected here and there over the years.

But the details of the blockbuster deal that was agreed to -- including one person involved in the talks telling CBS Sports that Bryant had given his conditional OK to be dealt to Detroit before rejecting it at the 11th hour -- have never fully been revealed.

"The deal was done," another person directly involved in the negotiations told CBS Sports. "We were just waiting to set up the conference call with the league office."

It was the 2007 preseason, four months after Bryant had publicly requested a trade and three months after an amateur video had surfaced showing Bryant eviscerating teammate Andrew Bynum and pointedly criticizing Kupchak. Nerves were frayed. Feelings were hurt.

In the background, Kupchak and Pistons president Joe Dumars had been quietly hammering away on a blockbuster deal for Bryant that made as much sense for both parties as possible in a situation when a Hall of Famer demands to be traded. 

According to one account from a person briefed on the timeline, Dumars was at a preseason game against the Mavericks when he got a call from Kupchak, who spoke the following words:

"We're good to go."

Another person familiar with how the deal was agreed to said Dumars actually was at home in his office when Kupchak contacted him to agree to the deal that would position the Pistons to remain atop the Eastern Conference and compete for another championship or three. The Pistons were a force at that time, beating the Lakers in the 2004 Finals and in the process of advancing to six straight conference finals.

Either way, there's consensus among those involved about what the final deal was: Rip Hamilton, Rodney Stuckey, Jason Maxiell and two first-round picks for Bryant.

According to one of the people involved in the talks, Bryant's first choice was Chicago, where he'd try to eclipse Michael Jordan's mark of six championships in his idol's very shadow. But Detroit also was on the list, the person said, on the following conditions: Chauncey Billups and Rasheed Wallace couldn't be included in the deal.

"Kobe had signed off on the deal," the person said. "He'd approved two teams: Chicago and Detroit."

At one point, Bryant had envisioned teaming up with Billups, Rasheed Wallace and Ben Wallace -- though by the time the talks came to fruition, the latter had signed as a free agent with the Bulls, who became Bryant's top choice.

Either way, over the years Bryant has steadfastly denied that he identified the Pistons as one of the teams for which he would waive his no-trade clause. Presented with the aforementioned scenario in an interview with CBS Sports on one of the stops during his farewell tour, Bryant responded, "No."

"It was pretty simple," Bryant said. "I gave them a list of teams I would go to, and that wasn't one of them. Simple."

Bryant said the same thing to Hamilton, who first became aware of the possibility that he might be moved to L.A. when he was reading the newspaper on the team bus. At first he dismissed it as just another empty rumor, but still curious after the fact, he approached Kobe at the All-Star Game and asked him about it. 

"I think it was close to happening," Hamilton told CBS Sports. "When I had that conversation with [Kobe], he told me about the trade, so I knew they were thinking about it. But at the end of the day, he had that no-trade kicker."

Others, again, tell a different story. According to multiple people briefed on the discussions, Kupchak had told Dumars that A) he wasn't going to trade Bryant within the Western Conference, and B) Chicago and Detroit were the only teams with enough talent and draft picks to make such a monumental trade happen.

The Pistons weren't yet at the point of knitting Bryant's jersey and planning the press conference, but they were close. There was but one step left before the deal could be official, and it would prove to be the death knell for an NBA trade for the ages.

Buss had been in Spain while the trade talks were taking place. The quixotic billionaire and architect of multiple Lakers dynasties had requested one last shot at talking Bryant out of the deal. A day or two after Dumars had received the "good to go" call, Kupchak called him at the Pistons offices in Auburn Hills, Mich., around mid-day with an ominous update.

Buss and Bryant wanted to meet in person before finalizing the trade. "This thing is in their hands now," Kupchak said, according to a person briefed on the conversation.

With that, the Pistons knew the deal was dead. "There was too much of a relationship there," one of the involved parties said.

Indeed, Buss reminded Kobe it was indeed good to be a Laker for life, and successfully played on Bryant's sense of loyalty and his trust in Buss to get him some help. By early February, Buss delivered -- landing Pau Gasol in a trade with the Memphis Grizzlies. 

Bryant and Gasol propelled the Lakers to three consecutive Finals appearances -- losing to the Celtics of Kevin Garnett, Paul Pierce and Ray Allen in 2008 and then beating the Magic and Celtics. As it turned out, they were the final two of Bryant's five championships.

The Pistons faded from prominence, advancing to one more Eastern Conference Finals and then losing in the first round in 2009 as LeBron James took over the East. Dumars, who spent his entire 14-year playing career with the Pistons, stepped down as president of basketball operations in 2014 after a 15-year run as an executive with the team.

If the Pistons hang onto the eighth spot in the East over their final three games of the season, they will secure their first postseason berth since 2009.

While the mystery of whether Bryant actually would've suited up in Detroit if not for that fateful meeting with Buss may never fully be solved, it's hard not to think about what might have been on all sides of the story.

Would a starting five of Bryant, Billups, Wallace, Tayshaun Prince and Antonio McDyess have won more than the two additional titles Bryant got with Gasol in LA? What superstar free agent or trade target would the Lakers ultimately have landed with all the assets acquired from Detroit in the deal?

Most vexing of all, how many Kobe vs. LeBron showdowns in the Eastern Conference Finals did the aborted deal cost us? Bryant and James coexisted in the NBA for 13 years, residing in difference conferences and never meeting in the NBA Finals.

There's so much we may never know about the last, great mystery of Bryant's two-decade reign in the NBA -- and so much of Bryant's farewell story that would've been rewritten entirely.

Just how close were Kobe Bryant and Rip Hamilton to swapping teams? (Getty)
Just how close were Kobe Bryant and Rip Hamilton to swapping teams in 2007? (Getty)