In late April, a commander for Islamic State said his forces were ready to launch an offensive to take Ramadi, and the group called for fighters to redeploy to Iraq from Syria.

Three weeks later, the jihadist group seized the capital of Anbar province after relentless waves of suicide bombings.

U.S. defense chief Ash Carterhas blamed Ramadi’s fall mainly on Iraqi forces’ lack of will to fight. But Islamic State’s battlefield performance suggests the terrorist group’s tactical sophistication is growing—a development the Iraqis and the U.S.-led coalition have so far failed to counter, said Iraqi officials, former U.S. officials and military analysts studying the organization.

An examination of how Ramadi fell indicates that Islamic State commanders executed a complex battle plan that outwitted a greater force of Iraqi troops as well as the much-lauded, U.S.-trained special-operations force known as the Golden Division, which had been fighting for months to defend the city.

Islamic State commanders evaded surveillance and airstrikes to bring reinforcements to its front lines in western Iraq. The group displayed a high degree of operational security by silencing its social media and propaganda teams during the Ramadi surge.