Late one night in April, a week before Venezuela's opposition launched its abortive uprising, four men sat on the terrace of the hillside compound in Caracas belonging to the chief justice of the country's Supreme Court.
The dim lights of the capital twinkling below them, they sipped Fiji bottled water as they plotted the ouster of President Nicolás Maduro.
Maduro's spy chief, General Christopher Figuera, and Cesar Omaña, a 39-year-old Venezuelan businessman based in Miami, were trying to seal a deal hashed out over weeks with Maikel Moreno, the chief justice, according to one of the participants in the meeting.
Figuera and Omaña were part of the plan to force Maduro out, but they needed Moreno's help.
Moreno, sitting before an ashtray laden with the stubs of Cuban cigars, appeared to be having doubts.
The 53-year-old jurist voiced concerns about Juan Guaidó, the US-backed opposition leader who would become the nation's interim president if the plot succeeded.
Then, according to the participant, Moreno offered another candidate to "temporarily" lead the broken country - himself.
"In the end, he was trying to safeguard his own power play," one senior opposition figure said.
This account is based on hours of interviews with three people familiar with the talks: the participant, a senior opposition official who was kept informed on the developments, and a senior US official briefed on the talks.
The account also sheds new light on the key question of what went wrong in the Venezuelan opposition's high-stakes move to oust Maduro on April 30.
The three people, who spoke on the condition of anonymity to discuss internal tactics, said Moreno's hesitant pledge to cooperate - and then his reversal - played a crucial role in the plan's collapse.
The failure of the uprising has cast new uncertainty on the opposition's months-long effort to oust Maduro.
Guaidó made a surprise appearance with a handful of troops at a military base in Caracas at dawn on April 30 to announce that he had the support of key military units and to call on others to join in the "final phase" of the campaign against the strongman.
But the broader military support never materialised, and Maduro's forces moved against opposition protesters, killing at least four and wounding scores.
While US officials still want Maduro out and say they remain engaged, they now say it probably will take longer than they initially believed.
US President Donald Trump has expressed frustration at his Administration's aggressive strategy, complaining he was misled about how easy it would be to replace Maduro with Guaidó, according to Administration officials and White House advisers.
Moreno's backing alone, opposition officials concede, might not have forced Maduro out on April 30. But the plotters were counting on Moreno to provide a vital lever to sway the military to their cause: a legal ruling that would have effectively acknowledged Guaidó as interim president and led to new elections. The fact that it never emerged, they believe, scared off key military and other loyalists.
They portray the chief justice, a former intelligence officer turned lawyer, as an angler with his own ambitions of power. The senior US official confirmed that the version of events described here concurred with descriptions offered to the Americans by the Venezuelan opposition, which had been updating them on the progress of the talks.
Secretary of State Mike Pompeo has publicly named Moreno as one of the top loyalists in talks to turn on Maduro.
Moreno, through a spokesman, did not respond to a request for comment. He has publicly condemned the plot against Maduro, and in the days since, the court he leads has issued charges, including treason,against opposition figures involved in the attempted ouster.
"I express my strong rejection of the illegal intention of a very small group of military and civilians who have sought to take political power with force, going against the constitution and the laws," Moreno said in a call to state TV 90 minutes after the uprising began.
Maduro hasn't openly moved against Moreno or any other senior loyalists that US and opposition officials claim were plotting against him.
Analysts see two possible reasons: Either the loyalists were feigning interest in ousting Maduro to learn more about the plot or expose it, or Maduro is too weak to act against other senior officials.
Opposition officials, while disappointed that the plan did not work, remain convinced that it has shown a critical lack of loyalty, and believe senior officials and justices might still be willing to turn.
Opposition officials say the move was originally scheduled for May 1 but had to be moved up a day when Figuera sent a text saying he had learned he was about to be replaced as head of SEBIN, Maduro's feared intelligence police.
Figuera also said Leopoldo López - under house arrest as the nation's most famous political prisoner, and a key player in the effort to oust Maduro - was about to be transferred back to a prison cell.
Opposition officials were also told that the government was preparing to take unspecified action against Guaidó and other senior opposition leaders.
"The message was: We had to act," one opposition leader said.
The conspirators made desperate attempts to reach Moreno that day, but their calls went unanswered. Gradually, many of the military men initially backing Guaidó at the La Carlota military base began to drift away. Others who had pledged their support never showed up.
Said one opposition official: If Moreno had acted, "the cracks [in Maduro's inner circle] would have been deeper, and probably definitive."