The contract hasn't been signed, but Tom Brady will be a Tampa Bay Buccaneer in 2020.

After two-plus decades. Brady decided to leave the New England Patriots for greener pastures away from Bill Belichick in Florida. But how did we get here?

Brady's decision reportedly wasn't made on a whim. The wheels for him to move on from the Pats were set in motion three years ago, sources told Bleacher Report's Matt Miller.

As the 2017 season approached, the Patriots faced a conundrum about what to do with their future at quarterback. Brady was aging, and then-25-year-old Jimmy Garoppolo was waiting in the wings. When would be the right time to move on from the greatest quarterback in history?

The 49ers called at the trade deadline, and after general manager John Lynch claims he jokingly asked about Brady, the teams agreed on a deal that sent Garoppolo to the Bay Area.

But that might not have been how it went down.

According to Miller, the 49ers originally called about Garoppolo, but Belichick instead offered Brady, wanting to keep the young quarterback to extend the Patriots' dynasty. A Patriots source confirmed to Miller that this is what happened, but team owner Robert Kraft squashed the idea of trading Brady.

"Kraft shut that s--t down fast," a source close to Belichick told Miller. "So, instead, Lynch gets Garoppolo, but Brady, Belichick and Kraft haven't been the same since Tom learned that Bill was ready to get rid of him. And that lit a fire under his ass."

Brady, fueled by Belichick's desire to ditch him for Garoppolo, took the Patriots to two more Super Bowls, winning one. All the while, the legendary quarterback restructured his deal, so the Patriots wouldn't be able to franchise tag him and he'd be free to leave.

After the Patriots were eliminated by the Tennessee Titans in the AFC wild-card round last season, Brady made no attempt to contact the Patriots about a new deal, per reports. Belichick didn't make some grand gesture to mend fences, either. So on Tuesday, Brady announced he'd be leaving the Patriots to pen his final NFL chapter elsewhere.

[RELATED: How Brady joining Bucs makes 49ers' schedule less daunting]

The Bucs weren't always Brady's endgame, but it appears leaving the Patriots might have been in the cards for a while.

Brady reportedly preferred to go to the 49ers, but Lynch and coach Kyle Shanahan elected to stick with Garoppolo, sending Brady to choose between the Bucs, Raiders and Los Angeles Chargers.

Brady's plan to leave the Patriots will end with him heading to Tampa, whenever the deal is finalized. And it reportedly started three years ago, when Belichick tried to ship Brady away and fractured the greatest dynasty in sports in the process.