International barter helped preserve the Comecon countries' scarce hard currency reserves. In strict economic terms, barter inevitably harmed countries whose goods would have brought higher prices in the free market or whose imports could have been obtained more cheaply and benefitted those for whom it was the other way around. Still, all of the Comecon countries gained some stability, and the governments gained some legitimacy, and in many ways this stability and protection from the world market was viewed, at least in the early years of Comecon, as an advantage of the system, as was the formation of stronger ties with other socialist countries.