This paper is about how immigrant bilingual students use their languages in the learning of mathematics. Our research has been with immigrant bilinguals in Catalonia, Spain, who arrived at a young age from South-American countries. We use a critical sociolinguistic approach, which draws on social theory in the analysis of how language is involved in the construction of teaching and learning opportunities. Our data point to the differences in the ways that the Spanish dominant bilingual students use their two languages during their engagement in mathematical activity. The shifts from Catalan to Spanish, and from Spanish to Catalan, coincide with shifts in the complexity of the students' mathematical practices. The students tend to use the two languages for different purposes, depending on the complexity of the mathematical practices, and in relation to different social settings that coexist within the classroom.