Abstract. We estimate the respective importance of spatial sorting and agglomeration economies in explaining the urban wage premium for workers with different sets of skills. Sorting is the main source of the wage premium. Agglomeration economies are in general small, but are larger for workers with skills associated with non-routine job tasks. They also appear to involve human capital accumulation, as evidenced by the change in the wage of workers moving away from denser regions. For workers with routine jobs, agglomeration economies are virtually nonexistent. Our results provide further evidence of spatial density bringing about productivity advantages primarily in contexts when problem-solving and interaction with others are important.JEL classification: R12, R23, J24, J31