The rebel groups and foreign powers contending to shape the country’s future.