This study examines how the Swedish Social Democratic Party and the Sweden Democrats construct ideas of migration, national belonging, integration and perceived threats in their election manifestos between 2014 and 2022. Through a qualitative ideological analysis based on Lindberg’s V-B-F model (values, descriptions and prescriptions), the study identifies how political ideas are structured and communicated in relation to migration and national identity. To interpret ideological positions, ideal types of socialism and nationalism are used as analytical reference points. Furthermore, Meguids theory of strategic party competition is applied to explain possible ideological shifts over time. The findings indicate that the parties maintain distinct ideological foundations but show signs of changing operational positions across the studied period. While Sweden Democrats consistently emphasise national cohesion and cultural continuity, the Social Democrats display indications of ideological adaptation in response to changing political conditions and increased salience of migration issues. The study contributes to research on political ideology by combining ideological content analysis with explanations of strategic party adaption over time.