The Spanish government had received many complaints from the nations whose ships were attacked by Puerto Rican pirate Captain Roberto Cofresí. Cofresí and his men had attacked eight ships, amongst them an American ship. The Spanish government, which routinely encouraged piracy against other nations, was pressured and felt obliged to pursue and capture the famous pirate. In 1824, Captain John Slout of the U.S. Naval Forces and his schooner engaged Cofresí in a fierce battle. The pirate Cofresí was captured, along with eleven of his crew members, and turned over to the Spanish Government. He was imprisoned in El Castillo del Morro in San Juan. Cofresi was judged by a Spanish Council of War, found guilty, and executed by firing squad on March 29, 1825.