Over a period of 43 hours from the start of free agency at midnight on Thursday until Al Horford tweeted a series of shamrock emojis on Saturday as the sun was beginning to set on a summer night on the East Coast, it looked as though Danny Ainge and the Boston Celtics were in serious trouble.

Kevin Durant, Boston’s biggest target, opened his free agency by meeting with the incumbent Oklahoma City Thunder, the recent champion and historically great Golden State Warriors, the star-laden Los Angeles Clippers and the universally respected and adored San Antonio Spurs before taking a meeting with the Celtics.

Ainge, who traveled to the Hamptons with a contingent that oddly included Tom Brady alongside several members of the Celtics’ young core, brought a handful of poker chips but a questionable hand to the table with Durant.

The news of Horford agreeing to a four-year, $113 million max deal broke as the Celtics were behind closed doors with Durant. Horford immediately became a third card in the hole for Ainge.

We may never know if Durant was able to read any tells, but as late of Saturday afternoon the Celtics were facing monumental disappointment and a change in the narrative surrounding Ainge.

As the Celtics pitched their future to Horford and prepared to court Durant, they watched Evan Turner agree upon a four-year, $70 million offer from the Portland Trail Blazers. Losing Turner wasn’t as potentially damaging as Dwight Howard agreeing to a three-year, $70.5 million deal with the Atlanta Hawks.

Howard joining the Hawks immediately put immense pressure on the Celtics to get something done -- and quickly. While the addition of Howard ultimately may have pushed Horford out of Atlanta, the Hawks didn’t give up on retaining him until the last minute. If Howard had signed elsewhere, it’s unlikely the Celtics would have been able to convince Horford to sign and they would have lost out on Howard as a very good short-term fit.  

Lost in the discussion of how much signing Horford has improved Boston’s chances of signing Durant is just how terribly things could have gone if Horford went elsewhere such as the Wizards of Pistons. It would have been a death knell for Ainge and Co.

Not agreeing to a deal with Horford would have completely closed the door on the Celtics getting Durant and with Howard off the board, Boston might have found themselves overpaying middling talent to fill cap space or signing players to a series of one-year deals in preparation for another run at making a big splash in 2017. We are talking about the possibility of selling Boston on guys like Ian Mahinmi, Dion Waiters and Eric Gordon.

Sam Hinkie, who hitched himself to The Process in Philadelphia, “left” the franchise this spring just weeks before the Sixers finally landed the No. 1 overall pick, took Ben Simmons and began fulfilling some of the promises he made when he was hired three years ago.

Oddly enough, just a month after Hinkie took over the 76ers, Ainge traded Paul Pierce, Kevin Garnett and Jason Terry to the Brooklyn Nets in exchange for Gerald Wallace, Kris Humphries, MarShon Brooks, Keith Bogans, Kris Joseph, two first-round draft picks and the right to swap first rounders in 2017.

The move, which finally signaled the end of an era past their prime, instantly made the Celtics’ future incredibly promising. Ainge then lured Brad Stevens away from the comfort of Butler a few days later.

From the early moments of the 2013 offseason until this spring three years later, there were stark parallels between the Sixers and Celtics despite vastly different on-court results.

Hinkie ushered unconcealed tanking into the NBA, stripping the Sixers down to their chassis with an eye on improving the team’s chances of landing a transcendent superstar with a top draft pick. The Sixers finished with the second-worst, third-worst and worst overall record in Hinkie’s nearly three seasons. Over those three years they won a total of 47 games -- 10 teams won 48 or more games this past season alone -- but they didn’t land anything better than the third overall selection until Bryan Colangelo assumed control of the front office this spring. Hinkie drafted Joel Embiid, who has yet to play a professional game, and Jahlil Okafor while continuing to accumulate future assets up until his departure. The Sixers, meanwhile, became a polarizing topic among basketball nerds and casual sports fans alike. You either brought fully into Hinkie or laughed at his process.

Ainge, meanwhile, operated with eerily similar weaponry. 

The Nets severely mortgaged their future for past-prime years of Pierce and Garnett in the Boston-Brooklyn trade. The Stepien Rule was enforced after Cleveland Cavaliers owner/executive Ted Stepien traded consecutive first-round picks from 1982 to 1985, but it’s doubtful a GM will deal a cache of picks as the Nets did ever again under what should be known as unwritten The Billy King Rule.

The Celtics’ rebuild post-Pierce/KG bottomed out quickly in 2014 (25 wins and the sixth overall pick) before they returned to respectability and two playoff appearances (two total wins).

While Stevens was trying to maximize an imperfect roster, Ainge preached and preached and preached about all of the flexibility the Celtics had going forward with cap space coming this summer and more draft picks than they could even use under the current construct of NBA rosters. It’s worth noting that his history of hitting on draft picks has been spotty at best.

As the Sixers piled up losses in hopes of landing a franchise-altering talent, the Celtics built a roster with enough pieces to build a strong supporting cast without a pair of stars. Those players would come -- they insisted -- with room for two max contracts and enough affordable, desirable talent and picks to swing a trade for one as well.

We heard about Kevin Love, DeMarcus Cousins and most recently, Jimmy Butler. All misses.

The Pierce/KG trade gave Ainge the unique advantage of remaining competitive while creating space for this summer and also counting on a stream of high picks courtesy of the downtrodden Nets. While Hinkie attempted to build a superpower by taking numerous punches on the chin, Ainge giggled as the Nets did the bleeding for him.

The Celtics won 48 games, but had the third overall pick in last month’s draft, putting them in prime position to finally (finally!) swing for the fences. As much flak as Hinkie took behind closed doors and in the media, Ainge remained relatively blemish-free until draft night came and went without Boston acquiring an established star. They took Jaylen Brown at No. 3, an intriguing talent in a draft short on potential stars and long on role players, and added five other players to ensure they would contend for both Summer League and D-League titles over the next two years.

That brings us to the last 48 hours, during which the Celtics were dangerously close to striking out in free agency.

Without Horford (Durant notwithstanding), Ainge would have built a future for Boston that looked no better than what Hinkie constructed for Philadelphia.

Would you rather have Simmons, Okafor, Embiid, Nerlens Noel, five first-round picks over the next three years and tons of money, or Isaiah Thomas, Jae Crowder, Avery Bradley, Marcus Smart, five first-round picks over the next three years and tons of money?

If you were looking for the highest ceiling, it wouldn’t have even been close. 

Al Horford won’t make the Celtics a contender alone, but they are in vastly better position going forward. They still have the picks and young talent to trade for another All-Star as soon as this summer and the free agent pool in 2017 figures to be extremely deep. 

Ainge isn’t done yet, but he’s certainly bought himself more time.