This paper contributes to the analysis of the process of spatial agglomeration of innovative activities by investigating directly its determinants. Our main purpose is to identify the extent to which the degree of industrial specialisation or diversity in a region may affect the innovative output in a particular local industry. Moreover, we test if any relevant difference arises with respect to the role of diversity in metropolitan areas and in high-tech sectors. The analysis was carried out thanks to an original databank on innovation and production across Italian local labour systems (see http://www.crenos.unica.it). According to the estimation results there are clear signs of the two types of externalities working simultaneously: Marshall externalities (or localisation economies), associated to industrial specialisation within the sector and also within the science base cluster; and Jacobs externalities (or urbanisation economies), associated to the degree of diversity of both the local districts and the science base cluster. Moreover, industrial diversity in the local system plays a different role depending on the dimension of the local system (whether it is a metropolitan area or not) and on the type of industry (high vs. low tech sectors).