ON NOVEMBER 20two heavily armed Islamic militants stormed a luxury hotel in Mali’s capital, Bamako, killing 22 people, including one American. As initial reports of the carnage emerged, so too did word that elite U.S. troops were also involved in the rescue operation.

About two years prior, another team of Americans — State Department and Africom personnel — traveled to Mali on a low-profile mission, interviewing local experts and government officials about the country’s antiterrorism capabilities. The internal report, marked “sensitive” and not intended for audiences outside the U.S. and Malian governments, offered a bleak assessment of the West African nation’s counterterrorism capabilities as well as a prophetic caution.

The December 2013 State Department Antiterrorism Assistance report, obtained by The Intercept via the Freedom of Information Act, characterized the north of the country as imperiled by a number of terror groups that “remain able to evade French pursuit.” The south was portrayed as far more secure, though the report notes that “a small number of experts” told the authors to “anticipate a terrorist attack in Bamako at some point.”

The State Department report takes on new relevance in the wake of last month’s attack on the Radisson Blu hotel. Despite decades of U.S. partnership, the government in Mali, according to the report, “lacks a national security strategy” and “has no national level incident management system,” while the “security forces investigative capabilities are deficient in many areas,” and their “abilities to manage crime scenes effectively and identify and collect evidentiary material at the scene of a terrorist incident are limited.”

Those conclusions draw into question the effectiveness of years of counterterrorism funding the U.S. government has provided to Mali. A State Department spokesman told The Intercept that the failure of the Malian government to make “strategic level decisions” limited the amount of counterterrorism assistance the U.S. could provide the West African nation.

Mali has been a partner in the State Department’s Antiterrorism Assistance Program since 1990, when the nation began receiving extensive U.S. aid, including training of its security forces by U.S. military personnel, in the years after 9/11. In 2002, the State Department launched a regional counterterrorism program — known as the Pan Sahel Initiative, which later became the Trans-Sahara Counterterrorism Partnership — to assist the militaries of Mali, Chad, Mauritania, and Niger. Between 2009 and 2013, U.S. agencies allocated $288 million in funding and disbursed about half that amount.

As counterterrorism funding to Mali ramped up, so, too, did direct military support. In 2004, U.S. Special Operations forces training teams deployed to Bamako as well as to the towns of Gao and Timbuktu as part of the Pan Sahel Initiative. “By cooperating with Mali to better protect its borders and territory, we can help keep it from being used by terrorists,” Vicki Huddleston, America’s ambassador to Mali, said at the time. “This makes Mali a very important partner in the war on terrorism.”

One beneficiary of U.S. assistance was Capt. Amadou Haya Sanogo, who, according to the New York Times, “received extensive training in the United States between 2004 and 2010.” In 2012, he overthrew his country’s democratically elected president as Mali reeled from the fallout of the previous year’s U.S.-backed war to oust Libyan dictator Muammar Gaddafi. Sanogo’s troops proved more adept at looting than stabilizing the country, which began to fall to heavily armed Islamist rebels.

Although the U.S. officially suspended military relations with Mali in the wake of the coup, U.S. commandos were nonetheless still operating there a month later, a fact that came to light only after several of them died following a booze-filled bar crawl through Bamako in April 2012.

In January 2013, France — which seized control of Mali in the late 19th century and held sway there until 1960 — launched a military intervention, code-named Operation Serval, to push back and defeat the Islamists.  Under the moniker Juniper Micron, the U.S. military backed France’s effort — airlifting its soldiers and materiel into Mali and flying refueling missions in support of its airpower — while assisting allied African forces.

The combined U.S., French, and African effort prevented the complete collapse of the country but left it with a persistent insurgency.

That spring, after repeated pledges by the Obama administration not to again put “boots on the ground” in the country, U.S. troops were sent back into Mali to support French and African forces. By that December, a combined State Department-Africom team was meeting with Malian counterparts to gauge the country’s post-coup counterterrorism capabilities.

Following the assessment, State Department counterterrorism funds for Mali in 2014 and 2015 were earmarked for “crisis response training in and around Bamako,” according to a spokesperson who offered the information on the condition that the news be sourced only to a “State Department official.” The efforts of Mali’s government to draft counterterrorism legislation and reorganize its security forces apparently hampered U.S. efforts, the official said.

Both the government of Mali in Bamako and Mali’s embassy in Washington, D.C., failed to respond to multiple requests by The Intercept for comment or an interview.

For its part, the State Department told The Intercept that its efforts were being closely coordinated with the French and other European partners, and that U.S. assistance was designed to “complement” those investments. “The U.S. Department of State is actively working with other U.S. government agencies to reassess support to Malian partners in light of the November 20 attack on the Radisson Blu hotel in Bamako,” said the State Department official.

Responsibility for that attack was claimed by al Mourabitoun, an al Qaeda offshoot. Mali’s president, Ibrahim Boubacar Keita, disputes the involvement of al Mourabitoun, suggesting that another shadowy group, the Macina Liberation Front, was responsible.

Speaking to a group of reporters on the day of the attack, Army Gen. David Rodriguez, chief of U.S. Africa Command, said it was “probably someone associated with al Qaeda in the Islamic Maghreb because … that is where they have the reach.”

The State Department failed to respond to specific questions about the results of U.S. support for Mali. “Mali’s new government is working to develop processes and protocols that are appropriate for Mali. The United States will be offering antiterrorism assistance when appropriate,” reads one official response.

The December 2013 State Department report, however, offered a stark warning for the future: “The disastrous incidents that occurred before, during, and after the March 2012 coup d’etat can happen again if Malian leaders do not enact a national policy that defines the roles and responsibilities of security forces at each level of response.”