On May 8, 1967, two small boats carrying a dozen heavily armed fighters made landfall near Machurucuto, a tiny fishing village 100 miles east of the Venezuelan capital, Caracas. Their plan was to march inland and recruit Venezuelan peasants to the cause of socialist revolution.

The eight Venezuelans and four Cubans who took part in this mad adventure were on a mission from Fidel Castro. It was the heyday of Cuban agitation abroad, with Cuban-backed guerrilla cells spreading throughout Latin America.

The fighters sent to Machurucuto had bad luck, though. A local fisherman spotted their abandoned boats and notified the Venezuelan military. An all-night gun battle followed. Little more than 72 hours after landing, nine of the guerrillas were dead and two others captured. Just one got away.

The first and only foreign military invasion of Venezuela of the past hundred years was a three-day-long fiasco.

The Machurucuto Incident, as this tiny drama came to be known, was the opening salvo in Castro’s decades-long obsession with bringing socialist revolution to Venezuela. With a shared Caribbean culture and vast oil wealth, Venezuela was a tempting target for Fidel from the start.

His big break came nearly three decades later, in December 1994, when a Venezuelan lieutenant colonel fresh out of a two-year stint in jail for leading an ill-starred coup attempt landed in Havana for a hero’s welcome.

As a clandestine conspirator, like his entire generation of Latin American wannabe revolutionaries, Hugo Chávez had idolized Fidel Castro. Castro sat enraptured as the dissident gave a keynote address to the University of Havana live on state television, raising the young Chávez’s stature immeasurably. The two struck up a famously intimate friendship.

In 1998, against all the odds, Castro’s protege was elected to Venezuela’s presidency, and the dream of Machurucuto came roaring back to life. Together, the two men forged an unprecedentedly close relationship. Billions of Venezuelan oil dollars flowed into Castro’s coffers as tens of thousands of Cuban “technical advisers” — doctors, sports trainers and an unknowable number of spies — spread throughout Venezuela. Cuba’s flag flew side by side with our own at Venezuelan military bases. Chávez’s personal security detail was handed over to Cuban intelligence.

Finally, in 2007, Chávez declared that Cuba and Venezuela were a single nation. “Deep down,” he said, “we are one single government.”

It was simply unprecedented: the virtual invasion of a larger, more powerful country by a smaller, weaker one at the larger country’s behest. Cuban methods for stamping out the free press and snuffing out dissent very gradually began to spread throughout Venezuela.

Cuban infiltration of Venezuelan state institutions — both military and civilian — was complete, with Cuban “advisers” watching over virtually every single office, institute, ministry, barrack and embassy of the Venezuelan state. Reporting directly back to Havana, this web of spies led to a bizarre situation where Castro often had a clearer intelligence picture of what was happening inside the Venezuelan state than the Venezuelan state itself. Chávez, by all accounts, simply trusted Castro’s spies more than he did his own.

In 2011, the Machurucuto incident cycle was completed when Fernando Soto Rojas, one of just three guerrillas who lived to tell the tale of the 1967 invasion, was elected speaker of Venezuela’s National Assembly. An aging communist without much of a political machine of his own, he had ridden his Cuban revolutionary street cred to the pinnacle of the Venezuelan state.

Later that year, when Chávez fell ill with cancer, the full extent of his devotion to Castro was revealed as a matter of life and death. Though the world’s premier cancer specialists in Brazil, France and the United States lined up to offer him cutting-edge treatment, Chávez refused to be seen by anyone other than the Cubans. Absent for long spells in a Havana hospital, Chávez’s health became a state secret — and a Cuban state secret, at that. Castro had detailed knowledge of Chávez’s condition when nobody in Caracas did.

If there’s one maxim Castro was devoted to throughout his life, it’s the idea that knowledge is power. Knowing Chávez’s cancer was terminal months before anyone else did allowed the Cubans the decisive edge in the high-stakes jockeying to select his successor.

There was no secret whom Castro favored: Nicolás Maduro may have been a gray, uncharismatic politician, but he was a Fidelista through and through. A former radical bus union organizer, Maduro had come up through the ranks of Liga Socialista, a militantly pro-Cuban fringe party he joined as a teenager. The closest thing to a university education he had came in 1986and 1987 when, as a 24-year-old, he undertook two years of intense ideological training at Cuba’s school of political training, along with communist activists from seven other Latin American countries.

For years as Chávez’s foreign minister, he had never shown the slightest deviation from Havana’s line. Maduro was the man Castro could trust to secure Cuba’s interests in Venezuela after Chávez’s death. And succeed Chávez he did.

In the long history of Castro’s sprawling record of international adventurism — from Nicaragua and Bolivia to Congo, Angola, Israel and beyond — Venezuela is but one chapter.

Success came late, but when it did it was complete. On the day he died, Castro left Venezuela the way he had dreamed since his youth: radically unfree and shackled to a Marxist dictator wholly subservient to Cuban interests.

Dictatorship in Venezuela is Castro’s greatest foreign policy victory, the cornerstone of his hemispheric legacy.