Two years later , free elections ushered in former Prime Minister Nicephore SOGLO as president , marking the first successful transfer of power in Africa from a dictatorship to a democracy .