CHICAGO — The hostage-taking commenced promptly at 6 p.m. Tuesday deep in the bowels of the Hilton Chicago.

To begin the NBA’s well-honed secrecy ritual around its annual draft lottery, a pair of public relations officials gathered 12 writers for a circuitous walk from one ballroom to another, past a sign that read: “Secure all personal items — Cameras, Laptop computers, purses, briefcases, cellphones, wallets or sensitive information.” One set of security officials checked the media’s credentials, and another set of staffers collected cellphones, smartwatches and other electronic devices in sealed yellow envelopes. Yet another set of security officials conducted head-to-toe searches with electronic wands.

Two floors above, an elaborate stage was erected for the NBA’s lottery show, the annual must-see, made-for-TV event that took on greater importance thanks to Zion Williamson, the obscenely talented Duke forward and presumptive top pick in the June 20 draft. Down below, in a lightly furnished dungeon, NBA Executive Vice President of Basketball Operations Kiki VanDeWeghe, Vice President of Events Lou DiSabatino, two league lawyers and Darrington Hobson, an employee of the Ernst & Young accounting firm, prepared to conduct the actual lottery drawing.

Every possible detail was considered to project propriety and transparency in the face of decades of conspiracy theories about draft results. The room’s door was locked down at 6:30 p.m. The lottery machine, with a blue base bearing the NBA’s logo and a simple on/off switch, was manufactured by Smartplay, whose website claims that the company “preserves drawing integrity for lottery and gaming organizations in 85 countries.” It sat in the middle of the room. While NBA officials said there had never been a machine malfunction, a Smartplay troubleshooter and a backup machine were waiting should the need arise.

The 14 white lottery balls, marked with simple dark numerals, were stored in a case with an orange seal. Those balls had been weighed, measured and certified in advance, and the seal remained intact until DiSabatino cut it off with a pair of scissors to begin the drawing, which was videotaped and later shared publicly.

Representatives from 15 teams sat in three rows of chairs facing the machine. Present were 13 of the 14 teams who missed the playoffs. In place of the Sacramento Kings were the Boston Celtics and Philadelphia 76ers, who would receive Sacramento’s pick via trade depending on where it landed.

Some teams sent executives, such as Boston Assistant General Manager Mike Zarren, Memphis Grizzlies VP of Basketball Operations Zachary Kleiman and Los Angeles Lakers GM Rob Pelinka. Others sent family members including Joey Reinsdorf, the son of Chicago Bulls President Michael Reinsdorf. The Washington Wizards sent both, teaming interim GM Tommy Shephard and Alex Fernandez, the son of Monumental Sports & Entertainment Vice Chairman Raul Fernandez. The only head coach present was Alvin Gentry of the New Orleans Pelicans, whose season went sideways when Anthony Davis, the top overall pick in 2012 and a perennial MVP candidate, publicly requested a trade.

Per the league’s exacting guidelines, DiSabatino mixed the balls for 20 seconds before selecting the first one, then waited 10 seconds in between the second, third and fourth selections. On a wall to the left of the stage, the NBA had printed out all 1,001 possible four-ball combinations, splitting 1,000 combinations into predetermined sections for each of the teams present. If selected, the 1,001st combination would prompt a redraw.

Under the new draft format, the league’s three worst teams each held a 14 percent chance to claim the top pick, meaning the New York Knicks, Cleveland Cavaliers and Phoenix Suns each had 140 numerical combinations. The Wizards, with the sixth-worst record, held a 9 percent chance at the top spot and 126 combinations. The Pelicans, with 6 percent odds, had just 84 winning combinations.

There were no formalities or dramatic buildups. VanDeWeghe briefly explained the process, which included separate drawings for the top four picks. A team’s numbers could only be called once, so any repeats would require a redraw.

With that, DiSabatino began at precisely 6:50 p.m. The first three numbers for the top pick came in: 7-4-12. Preferring not to wait to learn their fate, Pelinka, Shepherd and other representatives began rifling through packets of papers with the combinations on them to see whether they had a chance to win.

With one ball yet to be selected, there were 11 possible winning combinations: If the final ball was numbered 1, Cleveland would win. Phoenix had 2, Chicago had 3, Washington had 5, 6 and 8, and New Orleans had 9, 10, 11, 13 and 14.

Shepherd, in charge of the Wizards since Ernie Grunfeld’s April firing, knew his organization was just one number away from landing Williamson, who would instantly erase the anguish of a disappointing 32-win season that saw all-star guard John Wall lost to a season-ending Achilles’ injury that could keep him out most or all of next year, too. Fernandez, a 13-year-old lacrosse player at Landon, had a deer antler keychain tucked inside his jacket pocket for luck.

DiSabatino called out the fourth number — 13 — and VanDeWeghe flatly confirmed that the Pelicans had won the Zion sweepstakes.

Gentry, wearing a white dress shirt and a black-and-white striped Zegna tie, leaped up and triumphantly raised both of his hands above his head while pacing 10 feet from his second-row seat.

“F--- yeah!” he shouted, as the other representatives, including Shepherd, stared ahead blankly. With a wide smile, Gentry non-apologized for his profanity: “Sorry for that reaction. Not really.”

The veteran coach returned to his seat, where he clutched his head with both hands in shock, and the rest of the drawing commenced. The Grizzlies won the rights to the second pick, and Kleiman, who was directly to Gentry’s left, didn’t flinch. Allan Houston, a former player and the Knicks’ representative, was similarly blank-faced when he won the third selection, knowing that the Big Apple’s fierce Zion dreams had been dashed.

Pelinka, whose Lakers had just a 9.4 percent chance of moving up into one of the top four spots after winning 37 games, pushed his palms together in a prayer motion when he secured the fourth spot. L.A.’s big move up was made possible by a redraw, after one of Memphis’s combinations was selected for the second time.

Hobson, the Ernst & Young employee, sealed the envelopes and prepared to deliver them to NBA Deputy Commissioner Mark Tatum for the presentation. Forced to maintain their silence so as not to spoil the televised show, the team representatives mingled with media members and snacked on hors d’oeuvres.

An ecstatic Gentry took center stage, revealing that the Pelicans’ new VP of basketball operations, David Griffin, had predicted a lottery win shortly after arriving in New Orleans in April. He showed off a notepad, upon which he had written “This is our moment,” and revealed that his tie had been given to him by Griffin. In addition to bringing a lucky class ring and a fan’s 56-year-old wooden angel, Griffin had asked his former Cavaliers colleague, Jeff Cohen, for the tie that he wore to that franchise’s victorious lottery drawings in 2011, 2013 and 2014.

“[Cohen] said there’s no such thing as a lucky totem,” Griffin said later. “You don’t need a lucky rabbit’s foot. I said, ‘Yeah, okay, can I have the tie?’ So he sent us the tie.”

Gentry initially pretended that the Pelicans would keep their options open with the top pick, before gushing about Williamson’s team-first mentality and positionless game without much prodding. The coach argued that his franchise’s win was good for the NBA because the Pelicans are a small-market team that hadn’t intentionally tanked. He pledged that New Orleans staff would run up “a big receipt” celebrating in Chicago on Tuesday night, adding that Griffin’s remarkable lottery luck made him “worth the hire.”

Soon, a television was brought in so that the representatives could watch the results unfold on ESPN. Gentry smiled when host Rachel Nichols noted that the Pelicans had moved up, then scowled when analyst Adrian Wojnarowski mentioned the Davis trade talk.

When Wojnarowski later doubled back to say that the Pelicans could try to sell Davis on forming a star partnership with Williamson, Gentry yelled, “Thank you!” Even Pelinka, whose Lakers had been on the other end of rumors before the February trade deadline, laughed.

As Tatum got closer to revealing the top selections, Gentry admitted feeling a second round of nerves. “You’re hoping it doesn’t change, right?” Pelinka asked. Finally, after drawing groans from fans of the Bulls, who fell to seventh, and the Knicks, Tatum announced the Pelicans’ victory.

As Griffin exchanged dignified handshakes with the Grizzlies’ Director of Player Support Elliot Perry onstage, Gentry celebrated for the second time in the cavern. “It feels good, even again,” Gentry said.

The drawing room cleared out quickly after a few final reactions. Pelinka called the No. 4 pick a “powerful asset” to help the Lakers “put a winning team on the court that our fans deserve.” Lakers star LeBron James tweeted, “No. 4. Beautiful.”

Kleiman said he was “thrilled to finish second,” and showed off his lucky charm, an engraved Cartier watch given to him by his mother, who died five years ago following a battle with cancer. After falling in the lottery for the second year in a row, Reinsdorf wondered whether his younger brother, Harry, should represent the organization at future drawings. Shepherd smiled about the agonizing close call but declined to comment on the record.

As for Williamson, he betrayed no clear emotions when the Pelicans were revealed as his likely future home. The Duke forward departed the lottery ballroom without speaking to reporters, but he will be welcomed with open arms in New Orleans.

“I did everything I could for luck except wear my Mardi Gras beads,” Gentry said, unable to wipe the smile off his face while pledging to frame the winning tie. “When I go to Las Vegas for Summer League I’m going to be playing 7-4-12-13 a lot. I’ve had an NBA job to start each of the past 31 seasons, and this is the biggest thing to happen to me besides winning the title with Golden State [as an assistant coach]. That guy can change your whole franchise. This gives everyone hope.”

Read more: