WASHINGTON — America’s botched effort last month to support a Syrian moderate rebel group known as “Division 30” was a chain of errors that recalls, in a small way, the 1961 Bay of Pigs fiasco.

The Division 30 debacle has some clear and disturbing lessons: The rebels weren’t well prepared for their mission, and they had poor intelligence about potential adversaries inside Syria. The U.S. was too dependent on Turkey, and it didn’t have clear plans about how to respond if the rebels were attacked; although the U.S. eventually provided air support, it was too late to do much good.

Division 30 was the first contingent of Syrian rebels deployed under a $500 million “train and equip” plan authorized last year by Congress. It’s an overt program, run by U.S. Special Forces, separate from a parallel covert program run by the CIA. The idea is to generate over 5,000 trained fighters a year who could help clear Islamic State extremists in Syria and then hold the ground.

Many Syria analysts applauded the idea. By helping secure a safe zone in northern Syria, the force could facilitate humanitarian assistance and help provide greater security for the devastated population, in addition to pushing back the extremists. But the idea never had strong support from a White House that has been allergic to Syrian intervention.

Division 30 appears to have walked into a trap soon after its U.S.-trained contingent of 54 fighters entered Syria on July 12 to join up with fellow rebels at Azaz, just south of the Turkish border town of Kilis. Nearby were extremist fighters from Jabhat al-Nusra, the al-Qaeda affiliate in Syria, but commanders didn’t think Jabhat al-Nusra would attack. That expectation proved wrong.

The Jabhat al-Nusra extremists regarded Division 30 fighters as “American agents,” according to their Web postings. They kidnapped seven Division 30 fighters on July 29, and attacked its headquarters at Azaz on July 31. Jabhat al-Nusra kidnapped at least five more a few days later. The U.S. launched air strikes July 31, but they had little effect.

A Jabhat al-Nusra fighter named Ahamed Shaheed boasted online last Thursday, “Just got a bran new M16 taken as ganimah [war spoils] from Division 30 haha,” according to monitoring by SITE Intelligence Group.

Division 30’s difficulties illustrate U.S. problems working with Turkey. The rebel group was composed mainly of Syrians from the Turkmen ethnic group, recruited from an area north of Aleppo. The U.S. had preferred a plan to insert Kurdish and other Sunni fighters closer to Raqqa, the Islamic State’s self-proclaimed capital. But the Turks vetoed that plan.

The Division 30 recruits were perhaps too boastful about their American links. A Twitter account maintained by the group included some unlikely posts: One showed the iconic image of Iwo Jima Marines, but raising a Syrian rebel flag; another displayed a bald eagle wrapped in Syrian colors; a third featured a bald eagle in a rebel crest.

A vivid portrait of Division 30’s situation inside Syria comes from Jenan Moussa, a gutsy reporter for an Arabic television network called Al Aan. She interviewed Abu Iskandar, a Jordanian-trained rebel who is one of the group’s leaders, on Thursday in the countryside north of Aleppo. She emailed me?English translations of some of his comments.

“We were surprised by the attack by Nusra, because we coordinated in advance with Nusra,” Abu Iskandar said. “Four months ago, Nusra showed great admiration for the training project. Nusra said … go get guns and come fight [the Islamic State].”

Moussa said that although Abu Iskandar claimed he had 33 U.S.-trained fighters still with him, she only saw three. The rebel leader didn’t seem bitter. “He doesn’t bear any grudge against the U.S.,” Moussa said. “He was surprisingly optimistic and [said] that eventually 17,000 moderate forces trained by [the] U.S. will come to Syria.”

Given America’s history of mismanaging military support for rebel groups over many decades, it’s a wonder that people like Abu Iskandar still want to enlist. When the CIA landed a Cuban rebel force at the Bay of Pigs in 1961, the U.S. failed to provide adequate planning, intelligence, air cover or political support. According to Evan Thomas’ 1995 book, “The Very Best Men,” a Cuban operative abandoned on the beach cursed his American handler in a last radio transmission: “And you, sir, are a son of a bitch.”

Many Syrians surely feel a similar anger, but they still seem to want American help. The Syria nightmare deserves a coherent U.S. strategy — including new lessons learned from Division 30.

David Ignatius is a?syndicated columnist.