A small team, including one source within the Venezuelan government, had been observing where the 63-year-old slept, what he ate, what he wore and even, according to top military officials, "his pets". BBC 's Gareth Evans reported.
Then, in early December, a planned mission dubbed "Operation Absolute Resolve" was finalised. It was the result of months of meticulous planning and rehearsals, which even included elite US troops creating an exact full-size replica of Maduro's Caracas safe house to practise their entry routes.
The plan - which amounted to an extraordinary US military intervention in Latin America not seen since the Cold War - was closely guarded. Congress was not informed or consulted ahead of time. With the precise details set, top military officials simply had to wait for the optimal conditions to launch.
They wanted to maximise the element of surprise, officials said on Saturday. There was a false start four days earlier when President Trump gave approval but they opted to wait for better weather and less cloud cover.
"Over the weeks through Christmas and New Year, the men and women of the United States military sat ready, patiently waiting for the right triggers to be met and the president to order us into action," General Dan Caine, the nation's highest-ranking military officer, told a news conference on Saturday morning.
The order from the president to begin the mission finally came at 22:46 EDT on Friday. "We were going to do this four days ago, three days ago, two days ago, and then all of a sudden it opened up. And we said: Go," Trump himself told Fox & Friends on Saturday in the hours after the overnight raid.
"He said to us, and we appreciate it… good luck and Godspeed," Gen Caine said. Trump's order came shortly before midnight in Caracas, giving the military most of the night to operate in darkness.
What followed was a two-hour and twenty-minute mission by air, land and sea that stunned many in Washington and around the world. In terms of scale and precision, it was virtually unprecedented. And it drew immediate condemnation from several regional powers, with Brazil's President Lula da Silva saying the violent capture of Venezuela's leader set "yet another extremely dangerous precedent for the entire international community".