Actually, it was Marx who was agreeing with the economic theories of Smith, Say and Ricardo. Engels explains it quite well:
If there is anything clearly exposed in political economy, it is the fate attending the working classes under the reign of Free Trade. All those laws developed in the classical works on political economy, are strictly true under the supposition only, that trade be delivered from all fetters, that competition be perfectly free, not only within a single country, but upon the whole face of the earth. These laws, which A. Smith, Say, and Ricardo have developed, the laws under which wealth is produced and distributed these laws grow more true, more exact, then cease to be mere abstractions, in the same measure in which Free Trade is carried out. And the master of the science, when treating of any economical subject, tells us every moment that all their reasonings are founded upon the supposition that all fetters, yet existing, are to be removed from trade. They are quite right in following this method....
Thus it can justly be said, that the economists Ricardo and others know more about society as it will be, than about society as it is. They know more about the future than about the present. If you wish to read in the book of the future, open Smith, Say, Ricardo. There you will find described, as clearly as possible, the condition which awaits the working man under the reign of perfect Free Trade. Take, for instance, the authority of Ricardo, authority than which there is no better. What is the natural normal price of the labour of, economically speaking, a working man? Ricardo replies, Wages reduced to their minimum their lowest level....
Either you must disavow the whole of political economy as it exists at present, or you must allow that under the freedom of trade the whole severity of the laws of political economy will be applied to the working classes. Is that to say that we are against Free Trade? No, we are for Free Trade, because by Free Trade all economical laws, with their most astounding contradictions, will act upon a larger scale, upon a greater extent of territory, upon the territory of the whole earth; and because from the uniting of all these contradictions into a single group, where they stand face to face, will result the struggle which will itself eventuate in the emancipation of the proletarians....
~Frederick Engels, The Free Trade Congress at Brussels, October 9, 1847