The New York Times had an article (Libya Looks to Spain as Model for State-Building)about the visit of a Libyan delegation to study Spain's experiences in the transition from dictatorship to democracy.
Spain did it remarkably different from the Arabs. It forgave the supporters of Franco and allowed them to form a political party. It had for a full year a reformist government while the old parliament stayed in place - forcing it to compromise and to convince supporters of the old regime that the country wouldn't be handed over to radicals. After that year there were elections. Following the elections the government, political parties, employers and trade unions made an agreement on the economy: the Moncloa Pact. Later they also wrote a constitution.
Spain had to reconcile because it had a strong army that was sympathetic to the dictatorship. However, the good results - a sound democracy with a sound economy - show that this was the right thing to do. On closer consideration this is logical: many people who served the dictatorship - and even some who tortured - did this from the genuine belief that they were acting in the interest of their country. It is a good strategy to convince these people that the new freedom is at least as good as the old order and to have them cooperate in shaping the reforms.