THE FIRST CALL came about 24 hours before Major League Baseball's 4 p.m. ET July 31 trade deadline. Houston Astros general manager Jeff Luhnow reached out to his counterpart with the Arizona Diamondbacks, Mike Hazen. Luhnow wanted to talk about Zack Greinke. Hazen was happy to listen.

Both understood how things like this work. It was a long shot. Around this time of year, baseball executives sequester themselves in conference rooms for a week or two leading up to the deadline. They arrive early. They stay late. They eat like crap. They forget to shave. They squabble. They bicker. And they consume themselves with making their organizations better through the art of player movement, a talent that necessitates a delicate balance of creativity, resolve, flexibility and conviction.

In the weeks leading up to the deadline, thousands of potential deals die on the lips of those bold enough to utter them, whether a low-level baseball operations staffer whose brain works on overdrive dreaming up trade concepts, or someone like Luhnow and Hazen who can actually execute them. It would take a special sort of audacity to pull off something like this: moving one of the game's best pitchers and highest-paid players amid the frenzy of the clock ticking on deadline, when an office resembles a fire drill gone terribly wrong.

On Wednesday morning, nobody arrived at the Astros' or Diamondbacks' offices overly optimistic about the Greinke conversation going anywhere fruitful. That's the splendor of the trade deadline. Ideas are just ideas -- until they aren't. The Zack Greinke trade was a notion that evolved into a possibility that cooled into an unlikelihood that reanimated into an opportunity that shook the foundation of baseball.

Hours before Zack Greinke was traded to the Astros, a deal seemed unlikely enough that the Diamondbacks still sent him to the mound for his scheduled start at Yankee Stadium. Adam Hunger/USA TODAY Sports

OFFICIALLY, THE BIGGEST deal of the 2019 deadline became a reality around 3:55 p.m. Arizona would send Greinke to Houston in exchange for four minor league players -- Corbin Martin, J.B. Bukauskas, Seth Beer and Josh Rojas. The Diamondbacks would cover $24 million of the $77 million on Greinke's contract, which runs through the 2021 season. Everything was approved. MLB signed off. It was done.

The madness of the 24 or so hours before that it took for the trade to come together exhausted everyone involved. Only 20 minutes earlier had the Astros and Diamondbacks even agreed to the parameters of the trade, and that took the sort of back-and-forth that has wrecked countless deals before.

All of this started because of a trade that had nothing to do with either the Astros or the Diamondbacks. Three days before the deadline, the New York Mets acquired right-hander Marcus Stroman from the Toronto Blue Jays for a pair of pitching prospects. Whether it was the Mets' intention or not, the deal constrained the supply of starting pitching on the trade market. The Mets were suddenly the clearinghouse for pitching, with Noah Syndergaard and Zack Wheeler available, and it changed the way both buyers and sellers behaved.

It compelled the Astros to ask internally: What about Greinke? At 35 years old, he remains a master of command, the ball his to manipulate up and down and side to side and high mph to low. Other teams have considered him available in a deal because the size of his six-year, $206.5 million contract long has taken up a cartoonish portion of Arizona's payroll, and Houston wasn't on the ace's no-trade list. While they were open to anything, the Diamondbacks didn't shop Greinke in the days leading up to the deadline.

Arizona's front office had turned into inbound telemarketers after a reporter tweeted last week the Diamondbacks were sellers. It wasn't true. While the 2019 deadline blurred the buy-sell line, with the Mets getting Stroman and a sub-.500 Cincinnati team dealing for top starter Trevor Bauer, this was less about next season for Arizona and more about balancing this year and next year and plenty of years after. It's a healthy, reasonable approach; it's also the sort that doesn't afford a general manager nearly the leeway of a rebuild.

Luhnow had taken the complete teardown route to incredible success. The Astros got comically bad before getting comically good; they bottomed out with three consecutive 100-loss seasons, and they're on their way to a third consecutive 100-win season, the first of which led to a World Series victory. Their juggernaut shows little sign of abating, either. These Astros needed only another starting pitcher to complement Justin Verlander and Gerrit Cole, and they were interested in Stroman and Wheeler and Madison Bumgarner. Just not at the prices.

Teams recognize by now the discipline and patience of Luhnow. For two years, he has refused to trade his best prospects -- outfielder Kyle Tucker and pitcher Forrest Whitley -- and in those two years, he has still managed to make deals for Verlander and Cole. For having a reputation as cold and calculating -- some of it earned, some of it jealousy manifesting itself -- Luhnow does not operate like an automaton when it comes to trades. As other teams were paralyzed by the idea of giving up too much prospect capital to chase a World Series ring, Luhnow readied to pounce.

The conversation picked up the morning of deadline day, though not enough for the Diamondbacks to scratch Greinke from his start at Yankee Stadium. In hindsight, it illustrates how quickly the deal came together. Some Astros people figured the deal was dead the moment Greinke threw a pitch. The Diamondbacks simply couldn't expend all their bandwidth on the chance that a Greinke trade was going to be that one in a thousand. Hazen and his lieutenants, Jared Porter and Amiel Sawdaye, kept fielding calls, feeding the information to scouts and analysts, poring over data, iterating, tweaking, fighting, prodding.

That was how they long had worked, coming up together in Boston under the tutelage of Theo Epstein before joining the Diamondbacks to build something of their own. This was not the Red Sox, with their lavish budget and endless resources. The Diamondbacks thrive when their stars are developed within. They'd seen it this year, with Ketel Marte -- who came to Arizona in a trade -- growing into a star.

It's why the Diamondbacks listened when Luhnow asked to talk Greinke -- and kept listening as he upped his offers. This cannot be personal. It can't. No matter their deep fondness for Greinke, he was still a means to an end. Thinking that way can be soul-sucking, numbing, but in a baseball world where spontaneity has been replaced by indifference, the adapt-or-die adage applies. Turn off the emotion. Do your job. Do your damn job.

Trade deadline rumors and analysis The July 31 MLB trade deadline has officially passed. These are the deals that went down and what they mean for the teams that made them.

MLB trade deadline coverage

Even if it means doing so with a message looping in your mind: Are we really going to trade Zack Greinke? That's the thing about team war rooms for the draft or winter meetings or deadline: disagreement is not just present but encouraged. Explain an idea and defend it against all comers. What Luhnow offered for Greinke initially wasn't enough to satisfy Arizona. When the value of the prospect package increased, some in Houston balked -- the same instinct that held up other teams plenty present in the Astros' front office.

They were emboldened by the support of owner Jim Crane, who is just the right kind of hands-on -- supportive but not pushy, involved but not overbearing, and very, very happy to cut a check for stars. As talks intensified and Luhnow and Hazen saw the possibility of a deal becoming more realistic, Crane and the Diamondbacks' owner, Ken Kendrick, entered the picture. Kendrick, who four years ago awarded Greinke the richest per-year deal in baseball history, would need to sign off not just on sending Greinke to Houston but doing so with tens of millions of dollars attached.

At that point, the clock was beginning to become an enemy. The fanciful offers of earlier deadline day -- some executives are particularly fond of trying to swing three-team deals that excite the mind but rarely come together -- evaporated into a sense of urgency. It was time to ask more important questions. Is this the path we want to take? What is our walk-away? How do we value this? Where does this take us today? A year from now? Five? Answer those questions in real time, and balance them against the other three deals you're working on, and do this all with the player you're talking about standing on the mound at Yankee Stadium, and tension could strangle the room.

Only it doesn't. Because there's the job to do. There's the World Series to win for the Astros, so they up their offer. There's the present and future to consider for the Diamondbacks, so they hold out. The Astros kept upping, even perhaps slightly past their point of comfortability, because they saw what was happening. They knew Syndergaard and Wheeler weren't moving. They didn't think Bumgarner was going anywhere. Same with Mike Minor in Texas. And the Diamondbacks were so focused on shipping Greinke to them, Robbie Ray probably was staying put, too.

It dawned on the Astros: No one else was doing anything. The New York Yankees, with a record percentage points better than Houston's but a starting staff entirely inferior, didn't make a single move leading up to the deadline. The Los Angeles Dodgers, the class of the National League, made a couple of cosmetic upgrades. How others maneuver can't guide decision-making, but it can inform it, another data point on the side of why surrendering four good prospects would make sense.

The discussions transferred over to text between Luhnow and Hazen. In big deals, particularly when money is involved, there is a desire to memorialize the details, just so nothing is lost in translation during a conversation. It's very formal: We will trade you Players A, B, C and D. We will send you X amount of dollars. Here is how they will be distributed. Is the deal confirmed?

Sometime between 3:30 p.m. and 3:40 p.m. ET, it was confirmed. The scrambling didn't end there. The teams exchanged the medical information on all five players -- one of whom, the right-handed pitching prospect Martin, just underwent Tommy John surgery. Each team's trainer sought red flags. Operations staffers contacted MLB for approval on the $24 million cash transfer. Deals have died at the 1-yard line before. The Astros know. They believed a deal was in place to acquire Bryce Harper at the last trade deadline. Washington Nationals ownership scuttled it.

The Greinke deal suffered no such fate. The medicals looked good. The league approved the money. It was done. Word filtered to Astros manager A.J. Hinch as well, and players were told there would be a team meeting to discuss the goings-on. Hazen reached out to Diamondbacks manager Torey Lovullo -- their game against the Yankees was rain delayed -- to tell him and inform Greinke on the phone. It was a quick conversation. Hazen needed to go.

With less than five minutes before the deadline, the Diamondbacks had another trade to make.

play 1:36 Teixeira: Astros going all in by adding Greinke Mark Teixeira and Tim Kurkjian are confident that with the Astros trading for Zack Greinke, they strongly increased their chances of winning a second World Series in three years.

THE GREINKE DEAL was one of four each Houston and Arizona made. The Astros reacquired catcher Martin Maldonado from the Chicago Cubs, sent their previous backup, Max Stassi, to the Los Angeles Angels, and did what a number of evaluators saw as the deal of the day: sending backup outfielder Derek Fisher to Toronto for pitchers Aaron Sanchez and Joe Biagini, plus minor league outfielder Cal Stevenson.

It was a very Astros sort of day. They love little more than turning a 26th-round pick into a guy who got them Greinke, as they did with Josh Rojas. They got a lottery ticket in Sanchez, an incredible arm on whom they hope to sprinkle their pitching pixie dust like they did with Verlander, Cole and countless others. Biagini fortifies a bullpen in need of a workhorse arm. The best team in the AL got much better and didn't compromise its principles in the chase to do so. It wasn't an easy day, but it was unquestionably a fulfilling one.

Being a seller is different. Just two years ago, in Hazen, Porter and Sawdaye's first season running the Diamondbacks, they got off to a surprising 53-34 start and did what they think winning, flawed teams should: buy. When they completed a deal for J.D. Martinez, the room reveled. They'd done it.

Wednesday was more subdued, businesslike -- perhaps a touch somber. Divorcing emotion entirely from trades is a hard-to-reach goal. As they considered trading a foundation of their franchise, the Diamondbacks also flipped one of their best prospects, Double-A shortstop Jazz Chisholm, for Miami Marlins right-hander Zac Gallen, dealt catcher John Ryan Murphy for cash and, before the clock struck 4 p.m., executed that other trade, acquiring starter Mike Leake from Seattle.

What it's REALLY like to get traded From beards to bunnies to Airbnb, the behind-the-scenes stories of how trade deadline swaps affect players, their families and others -- both on and off the field. Eddie Matz »

This was their nod to the team that has competed all season long, staying around .500. Even if they traded Greinke and in doing so prioritized the future, they weren't abandoning the present. It's delicate. Just as the Astros had experience pulling off deadline stunners -- the Verlander deal was done just minutes before the clock struck midnight Aug. 31, 2017 -- Arizona knows what it's like to ship off franchise icons.

Over the winter, they traded first baseman Paul Goldschmidt, long the face of the team. The deal took more than two months, from its initial conversations to the final agreement with the St. Louis Cardinals. And so far, the Diamondbacks have done quite well. Carson Kelly is already excellent and could grow into an All-Star catcher. Right-hander Luke Weaver looked like a mid-rotation starter before his elbow started barking. Utilityman Andy Young could be up next year.

Every trade is different, of course. Some take two months, some two hours, some even two minutes. The Greinke deal took a day -- a long, contouring, emotional, fulfilling 24 hours that drained the energy of everyone involved almost as much as it did their phone batteries.

In the end, all would like to believe they know exactly what they're doing, that they're impervious to the flaws and weaknesses they may believe they see in other teams' strategies -- that, more than anything, they're right. Luhnow's ring is his currency there. Arizona's front office tends to be different, always cognizant of a lesson long preached by Epstein and even still as he runs the Chicago Cubs: "We are all idiots."

The worst deadline trades for all 30 teams Curt Schilling (twice!), Corey Kluber and "What the hell did you trade Jay Buhner for?!?" We relive summer blockbusters gone wrong that GMs would love to forget. David Schoenfield

He says that, and he says "We don't know s---," and he says other derivations because of days like Wednesday. In an era when prospects simply don't get traded, the Diamondbacks dealt a toolsy shortstop. In an era when elite players rarely if ever get traded, the Diamondbacks dealt a star pitcher. They didn't do this because they were trying to zig where others zag; people who operate from the perspective that they're idiots know better than to try to be the smartest guy in the room.

The Diamondbacks, in a circuitous way, did what plenty of other teams wouldn't Wednesday: They tried something incredibly risky in order to win. Which was the hidden beauty of the Zack Greinke deal. As those 24 hours culminated, as all the harried sprints around the office and juggled phone calls and tired thumbs came to mean something -- as the foundation of baseball shook -- it was the product of two teams taking entirely different paths in search of the same destination: a parade.