For some reason there is a widely held belief that Karl Marx was a stateist which is false. Marx observed class-distinction early on and his primary goal was the abolition of class on a fundamental level. He argues in terms of justice that class-distinction leads to Master-slave dynamics where people ending up on the wrong side of the equation will inevitably lead to them being unfairly exploited. Later on, Marx elaborates on socialism and then, ultimately, communism, at which point Marx realizes on his own that any form of governance (or hierarchy) would eventually lead to the same class-distinction and to exploitation. He tackles this problem by labeling socialism as well as the need for a state as a transitional period as society evolves towards communism. However, Marx' explicitly states that when communism is attained, one of the important steps will be to abolish any form of state since just the existence of a state ultimately leads to class separation.
Both Adam Smith and Karl Marx tackle the problem of class division. Whilst Karl Marx calls for a revolution to instill equality such that there are no master-slave dynamics as per Nietzsche, Adam Smith suggest a form of atomization of power where all individuals become masters. In Adam Smith's theory, there are no masters and slaves but every individual follows their own enterprise such that employment is seen as a collaboration between enterprises. In effect, the same results regarding equality are to be expected following both views.