Insurgency and guerrilla warfare impose enormous socio-economic costs and often persist for decades. The opacity of such forms of conflict is often an obstacle to effective international humanitarian intervention and development programs. To shed light on the internal organization of otherwise unknown insurgent groups, this paper proposes two methodologies for the detection of unobserved coalitions of militant factions in conflict areas, and studies their main determinants. Our approach is parsimonious and based on daily geocoded incident-level data on insurgent attacks alone. We provide applications to the Afghan conflict during the 2004-2009 period and to Pakistan during the 2008- 2011 period, identifying systematically different coalition structures. Further applications are discussed.