In fact, it is well known, at least since Polanyi's classic, that the key markets in capitalist economies (those for land, labor and money) were slowly created by the interplay of social conflicts articulated through the political process and that their very existence results, in part, from the power of the State. Thus, simplistic and manicheistic views on the relation between the State versus the 'free' market miss the point of how States and markets co-evolved historically.
For example, the Bank of England, created in 1694, obtained the monopoly of money creation only after the Bank Charter Act of 1844, something that resulted from the victory of the City (financial interests) over the country banks (closer to commercial interests). The money issuing monopoly would be impossible without the backing of the government (and its monopoly of violence). The same can be said about international trade transactions. For example, it is well known that the period of the so-called first globalization (1870-1914) saw a significant increase in the volume of world trade. However, several regions actually became more 'protectionist,' i.e. increased the tariffs on trade (see Paul Bairoch for a good discussion on the topic).
In Latin America the higher tariffs allowed government revenue to increase, which, in turn, created the conditions for national armies to reduce domestic conflicts, and centralize administration, provide guarantees for foreign lenders, and fund the construction of railroads and ports. Without tariffs and higher government revenue the integration into world markets would not have been possible.
That does not mean that everybody in Latin America (or in other regions for that matter) did benefit from the increase in international trade during the period [it's worth remembering that in Mexico, towards the end of the period, peasants did revolt against the Porfiriato in the so-called Mexican Revolution of 1910]. It was not 'free' trade that produced growth, but the management of trade to produce commodities for the center (a particular project supported by local elites and international financial and commercial groups) that led to growth (with high levels of inequality).
A more logical discussion, for all these reasons, should not be about 'free' trade versus protectionism, but about what type of managed trade a given society wants, and who benefits from the different trade arrangements. For example, in current discussions about bilateral and multilateral trade agreements the issues of investment and property clauses are essential. The dispute is mostly about those that want to protect the interests of corporations (e.g. property rights, access to foreign courts, elimination of financial regulations forbidding sending profits abroad, etc.), and those that might have alternative interests (e.g. protecting domestic jobs, creating national capacity for industrial innovation, the environment, etc). In fact, for specific cases, like defense or sanitary and phytosanitary rules, it is well established that trade should be regulated, i.e. not 'free' but managed (for discussions of some current problems with the 'free' trade agenda see here and here).
But the problems for the defenders of 'free' trade are not limited to the inconsistencies of their policy positions. In fact, despite the general agreement on 'free' trade by academic (mainstream) economists, the theoretical foundations for their position are very shaky. The basis for the argument harks back to David Ricardo's Principles (and also to the parallel work by Robert Torrens). Ricardo argued that if England and Portugal traded without imposing tariffs it would be mutually beneficial, even if Portugal was better at producing both goods being traded, cloth and wine. The reason is simple. Even if Portuguese workers were more productive than their English counter-parts at producing both goods, they might be better at producing one of them (say wine) and would still benefit from putting all their efforts behind the activity at which they excelled.
In other words, the argument for trade without tariff or other restrictions was based on the the idea that trade is equivalent to access to better technology. The Portuguese could specialize in what they are better technologically, and obtain through trade the things that they do not produce. The English would have also access to better wine. Both would get cloth even if the English were less effective at producing it. The message is: specialization is the wealth of the nations.
However, what is often missed in the discussion is that the Ricardian argument for comparative advantage, as it is the case with all economic models, depends upon certain special assumptions, and that those premises responded to Ricardo's own political views. First, Ricardo assumed that all workers that were employed in wine production in England would find jobs in cloth production, and that all workers in the cloth sector in Portugal would be able to work in the wine sector. Say's Law of Markets, that suggests that general demand crisis do not take place domestically was extended to external markets too. Workers are always employed by definition (not necessarily full employment for Ricardo). Further, Ricardo assumed that capital was immobile, that is, even if it was cheaper to produce from Portugal (given its higher productivity and lower costs) and export to England, English capitalists would prefer to maintain their capital in England and produce in the home country.
Note that if any of those assumptions is violated Ricardo's argument falls apart. In other words, if workers in England and/or in Portugal in the displaced sector cannot find jobs in the other sector, it is unclear that all benefit from 'free' trade. Also, if capitalists can and do move from country to country (interestingly enough Ricardo descended from a family of bankers emigrated from Portugal to Italy, then to the Dutch Republic and finally to England) then in his example the lower costs (absolute advantage) of Portugal would determine that both cloth and wine would be produced there. England would be in a difficult situation importing both goods and condemned to grow at a lower pace, which is exactly the opposite of the historical situation (for an analysis of Anglo-Portuguese trade after the Methuen Treaty of 1703 that allowed Portuguese wine to be exported to England free of taxes and the same for English textiles into Portugal see Sandro Sideri's Trade and Power).
The reasons for Ricardo's special assumptions are very well-known. Ricardo represented financial and industrial interests, and was a harsh critic of the Corn Laws, the tariffs on imported grain imposed after the Napoleonic Wars, that favored the landed and aristocratic classes, defended by his friend Robert Malthus. Ricardo assumed that wages were at the subsistence level, and that tariffs on the importation of grain would lead to the use of more and less productive land in England for their production, increasing the rent accrued by the landowners. For a given output, and fixed wages, the higher rent would necessarily reduce profits, and capital accumulation. In other words, the special assumptions (which Ricardo thought relevant for the particular case of England in that particular historical context) were instrumental in his argument for the elimination of tariffs on grain imports. His was a progressive argument for industrialization and against the agrarian aristocracy (for a discussion of Ricardo's political views see Milgate and Stimson's Ricardian Politics).
Generalizations of the Ricardian argument can only be defended if his assumptions (including that displaced workers do find jobs and there is no capital mobility) are also thought to be generally valid. More modern arguments for 'free' trade rest on the so-called Heckscher-Ohlin-Samuleson (HOS) model, that is fraught with logical problems, and even less defensible than the generalization of Ricardian views, but I'll deal with those in another post.
PS: My paper "What Do Undergrads Really Need to Know About Trade and Finance" might provide a more detailed discussion of some of the issues above. Robert Vienneau has posted here elements of the Sraffian critique of the HOS model.