This is the first study to use an achievement test score to analyze whether the income gap between second-generation immigrants and natives is caused by a skill gap rather than ethnic discrimination. Since, in principle, every male Swedish citizen takes the test when turning 18, we are able to bring more evidence to bear on the matter by estimating the income gap for a very large sample of individuals who are of the same age and have the same years of schooling at the test date. Once the result of the Swedish Military Enlistment Test is controlled for, the income gap almost disappears for second generation immigrants with both parents born in Southern Europe or outside Europe. However, when using a regular set of control variables the income gap becomes overestimated. This difference in results is most likely explained by the fact that schooling is a bad measure of productive skills for these groups of second-generation immigrants. It indicates that they compensate for their lower probability of being employed by investing in (in relation to their skill level) more schooling than otherwise similar natives.