The article examines the process of ideological evolution of the Communist Party of Spain (CPS) from its foundation to its transition to «Eurocommunist» positions. In analyzing the main stages of the transformation of the CPS ideology, its activities during the Second Republic and the Civil War, during the Francoist dictatorship and at the stage of transition to democracy are taken into account. The CPS, which emerged under the influence of the Comintern and the October Revolution, organizationally took shape after several splits in the Spanish Socialist Workers’ Party and the Federation of Socialist Youth. For a long time, the CPS was under the ideological control of the Comintern and, following the «international communist party», supported the theory of «social fascism», which equated fascism with social democracy, but later abandoned it in favor of the policy of the «popular front». During the Second Republic and the Civil War, the CPS moved to cooperate with other left-wing republican parties and began to gradually expand its social base. One of the ideological innovations of the civil war was the formation of the concept of «left» patriotism. The strengthening of the dictatorship of Francisco Franco forced the PCI to make its ideology more flexible and abandon the theory of the «dictatorship of the proletariat» in favor of the formulations «new democratic system» and «democracy for all Spanish people». The period of democratic transition became the culmination of the Eurocommunist project, at this stage the CPS recognized the constitutional monarchy and rejected revolutionary methods of struggle for power.