Another data point for a state having no legitimacy unless it takes a social democratic approach. Nathanial Fink describes the counter-insurgency campaign in Afghanistan:

Consider, for example, the question of roads. When U.N. teams begin building new stretches of road in volatile Afghan provinces such as Zabul and Kandahar, insurgents inevitably attack the workers. But as the projects progress and villagers begin to see the benefits of having paved access to markets and health care, the Taliban attacks become less frequent.

Non-state actors gain their political legitimacy in the same way. Hezbollah and Hamas both have social democratic and judicial components which not only replaces a weak state but helps keep it out of those areas.

Hezbollah is the second largest employer in Lebanon. It runs hospitals, orphanages, discount pharmacies and garbage collection. All of those are services which governments in Australia provide. (more)

Is social democratic organisation the only way an elected government can maintain their legitimacy against intrusion from non-state movements? (more)
Cam Riley: South Sea Republic. Freedom, liberty, equity and an Australian Republic.