HAVANA — For more than two years, a U.S. agency secretly infiltrated Cuba’s underground hip-hop movement, recruiting unwitting rappers to spark a youth movement against the government, according to documents obtained by The Associated Press.

The idea was to use Cuban musicians “to break the information blockade” and build a network of young people seeking “social change,” documents show. But the operation was amateurish and profoundly unsuccessful.

On at least six occasions, Cuban authorities detained or interrogated people involved in the program; they also confiscated computer hardware, and in some cases it contained information that jeopardized Cubans who likely had no idea they were caught up in a clandestine U.S. operation. Still, contractors working for the U.S. Agency for International Development kept putting themselves and their targets at risk, the AP investigation found.

They also ended up compromising Cuba’s vibrant hip-hop culture – which has produced some of the hardest-hitting grassroots criticism since Fidel Castro came to power in 1959. Artists that USAID contractors tried to promote left the country or stopped performing after pressure from the Cuban government, and one of the island’s most popular independent music festivals was taken over after officials linked it to USAID.

The program is laid out in documents involving Creative Associates International, a Washington, D.C., contractor paid millions of dollars to undermine Cuba’s communist government. The thousands of pages include contracts, emails, preserved chats, budgets, expense reports, power points, photographs and passports.

The work included the creation of a “Cuban Twitter” social network and the dispatch of inexperienced Latin American youth to recruit activists, operations that were the focus of previous AP stories.

“Any assertions that our work is secret or covert are simply false,” USAID said in a statement Wednesday. Its programs were aimed at strengthening civil society “often in places where civic engagement is suppressed and where people are harassed, arrested, subjected to physical harm or worse.

Creative Associates did not immediately respond to a request for comment.

At first, the hip-hop operation was run in Cuba by Serbian contractor Rajko Bozic. His project was inspired by the protest concerts of the student movement that helped undermine former Serbian President Slobodan Milosevic in 2000.