The performance gap in math of immigrant students is investigated using PISA 2012. The gap with respect to non-immigrant schoolmates is first measured. The hypotheses that first (second) generation students coming from (whose parents come from) countries with a higher performance in math fare better than their immigrant peers coming from lower-ranked countries are then tested on a sample of about 13,000 immigrant students. The estimated average immigrant-native score gap in math amounts to -12 points. The results show that immigrant students coming from higher-ranked origin countries have a significantly lower score gap, and are thus relatively less disadvantaged. For example, coming from a country in the top quintile for math and having attended school there for one year improves the absolute score gap by nearly 39 points, the highest coefficient among the variables that reduce the gap, such as parental education and socio-economic status.