Vera Politica is probably most correct. Marx predicted that capitalism would run its course, if you will, but not necessarily be replaced by communism. I am, however, interested on what you mean by 'barbarism' - incidentally, the most primitive of social formations was the commune.
I will quote Paul Sweezy from
The Transition to Socialism, who has some insight into this question I believe:
It is easy to cite dozens of passages from the works of Marx and Engels affirming the revolutionary role of the proletariat in the overthrow of capitalism. I have not, however, found any which are specifically addressed to the question of the proletariat's ability or readiness to build a socialist society; and at least some of their formulations, especially those which analyze the effects of the division of labor on the worker, clearly imply a negative evalution pf the proletariat's qualifications.
...As I indicated earlier [that he used to believe in the spontaneity of socialism within the working class, Fitz.], I used to think that this was indeed their view but an effot to prove it convinced me I was wrong. Not only does one look in vain for specific statements attributing revolutionary socialist spontaneism to the proletariat, but the lifelong practice of the two men would be incomphrensible if they had held such a view of the proletariat.
"When the Englishman speaks of national wealth he means the number of millionaires in the country." - Spengler