Starting high school? On the origins of secondary education in Spain, 1857–1901

The development of modern educational systems radically altered the way knowledge and skills were transmitted. Yet, while elementary schooling rapidly expanded in late 19th and early twentieth centuries, secondary education struggled to find its way. This was also the case in Spain where, despite a growing demand, the provision of public secondary education during the second half of the 19th century was rather limited. As a result, private education, and especially that promoted by the Church, rushed to fill in the gap. Using a new database with municipal-level data, we examine what drove the expansion of private schools. As expected, demand-pull factors were critical. Still, the interplay between local forces and private agents should not be overlooked, especially as the State lacked the financial muscle and political will to broaden access to secondary education, whereas the Church was searching for a niche from which to consolidate its position in the nascent liberal society.


Introduction
Human capital is one of the bedrocks of economic growth and development (Romer 1986(Romer , 1990Lucas 1988). In turn, what allows for the accumulation of human capital, skills and knowledge is intrinsic to human nature and, in general, cannot be observed. 1 Likewise, human capital formation results from formal and informal learning and occurs over a lifespan, and as a result, its measurement is still a challenge (Goldin 2016). Educational attainment has regularly been used as a proxy in cross-country empirical studies (Barro 1991;Mankiw et al. 1992;Gennaioli et al. 2013). 2 This approach, however, demands a hierarchical and uniform education system; ignores informal learning and on-the-job training; and neglects a relevant facet, the quality of education Woessmann 2008, 2012). 3 In any case, schooling has played (and still does) a crucial role in improving knowledge access while it also shapes our personal and social development (Bowles and Gintis 1976;Oreopoulos and Salvanes 2011) and, more specifically, affects social cohesion and nation-building (Alesina et al. 2021).
Regarding formal education, the impact of schooling on human capital formation has been widely discussed. In the age of the Enlightenment, the amount and accessibility of knowledge improved across Europe (Mokyr 2005a): not only more books were available (Buringh and van Zanden 2009; Dittmar 2019) but also numerous societies and public libraries, among others, were founded. 4 Still, it does not appear that a more literate society was fundamental for the British industrialisation (Schofield 1973;Mitch 1999). 5 Nonetheless, numerical skills might have been more widespread than literacy in Western Europe before the introduction of compulsory schooling (A'Hearn et al. 2009;Baten and Juif 2014;Tollnek and Baten 2017). In this regard, some authors have suggested that useful knowledge, resulting from the combined efforts of knowledge elites and skilled artisans, was at the core of the matter (Mokyr 2005b(Mokyr , 2017. 6 Then, and although those in the upper tail received formal education, informal learning and technical training might have contributed more than schooling to pave the way for modern economic growth. 7 However, it has recently been suggested that intermediate human capital, understood as 3 Pritchett (2001) raised concerns on the impact of schooling on economic progress. In particular, it was noted that educational attainment contributed less than expected to growth in developing countries since the 1960s. A potential explanation was that schooling might not be effective in "transmitting knowledge and skills" (Pritchett 2001: 388). Still, even if schooling was effective, there are country-specific characteristics that might lead to a wrong use of skills and knowledge. 4 For a study on access to knowledge and its effects on the accumulation of human capital during the British industrial revolution, see Dowey (2017). Howes (2020) on the other hand, offers a compelling account on the importance of the Royal Society of Arts. 5 This apparent lack of connection between popular literacy and economic growth and development was at the core of the literacy myth argument (Graff 2010). 6 The concept useful knowledge is defined as the one that permits the manipulation of nature through "artifacts, materials, energyº and living beings" for material benefit (Mokyr 2005b: 3). See also (Humphries 2003;Meisenzahl and Mokyr 2012;de la Croix et al. 2018). 7 It has been documented that formal schooling decreased in the early years of the British industrialisation (de Pleijt 2018;de Pleijt et al. 2020). Likewise, and using autobiographical evidence, Humphries (2010) also noted a decline of the years of schooling of boys. Feldman and van der Beek (2016) and Ben Zeev et al. (2017) also found that the number of apprentices increased as technological change occurred in the early years of the British industrialisation. That said, it has also been argued that the rise of the factory system could have reduced the demand for skilled workers, in what came to be known as the deskilling hypothesis (de Pleijt and Weisdorf 2017). See also Squicciarini and Voigtländer (2015).

3
Starting high school? On the origins of secondary education… "intermediate skills formed by the diffusion of basic general knowledge that goes beyond basic literacy and numeracy skills" (Diebolt et al. 2021: 169) was important given its relatively advanced character but generic enough to adapt to the changing needs of nascent industries. 8 Anyhow, learning beyond basic skills required a more demanding educational infrastructure in terms of schools, teachers and other resources.
In this regard, the experience of the United States is paradigmatic. According to Katz (1998, 2008), once capital and technology-skill complementarities became apparent in early 20th century, a "race between education and technology" followed. 9 This American leadership has since been attributed to the high school movement Katz 1999, 2008) which built on common schools (Go and Lindert 2010). Interestingly, the building and funding of high schools responded not only to income and wealth levels but also to the expected returns in local labour markets, what constitutes a meaningful example of a close relationship between educational institutions and economic activity at the municipal level. In more cohesive communities, there was more consensus on the foundation of high schools because, in addition, this was a means to consolidating their own local districts in a context of public service competition among municipalities (Goldin and Katz 1999). Still, this high school movement occurred in an exceptional scenario in which "New World features with republican ideology (…) produced a unique educational system" (Goldin 2001: 275). The expansion of post-elementary education in the USA between 1910 and 1940, however, contrasted with the slow progress witnessed in Europe. 10 In the case of Spain, it has been argued that the lack of human capital severely limited economic growth and subsequent modernisation (Núñez 1992(Núñez , 2005; Prados de la Escosura and Rosés 2010; Carreras and Tafunell 2021). Although the core explanation rests on the low social demand for education and the inaction of the State, few countrywide and quantitative studies have delved deeper into the matter. Using literacy, Núñez (1992) and Beltrán-Tapia et al. (2019) have showed marked disparities across and within provinces that may explain, at least in part, the different trajectories of regional development. Yet, and except for some broad approaches (Viñao Frago 1982;Sanz Díaz 1985;Díaz de la Guardia Bueno 1988), there is not a countrywide study on the origins and early stages of secondary education in Spain and, more specifically, the characteristics of its territorial expansion.
In this study, we fill the gap by focusing on the period that goes from 1857 to 1901. By 1857, a hierarchical and uniform education system had been instituted. At the top of this pyramidal structure, tertiary education was only offered in State (or official) universities and advanced schools, while secondary studies could be taken in State schools or privately. However, the limited capacity and scope of State education remained basically unaltered during the period of study. Political instability and, above all, the recurring difficulties of the public finances were at the core of the matter (de Riquer i Permanyer 2015). 11 In this context, private education thrived. In 1857, there were around 50 private schools countrywide. By 1901, there were more than 600. In this article we first document the origins and early years of secondary education. Then, we empirically assess the spatial distribution of private schools by assessing the impact of different socio-economic variables on the decision of opening a private school. For this, a new dataset with information at the municipal level is presented. As expected, the creation of new private schools is not a random process. In line with the high school movement, demand was largely responsible for it, but the Spanish case offers further insight, especially regarding the interplay between local forces and private agents. 12 The mounting presence of Catholic schools reignited the religious question which in turn led to a conflictive secularisation that marked the early 20th century (de la Cueva and Montero 2007). 13 Our contribution is twofold. First, although the expansion of elementary schooling has received a great deal of attention (Cappelli 2016a, b;Cvrcek and Zajicek 2019;Montalbo 2020Montalbo , 2021Westberg and Cappelli 2019), secondary education is less well documented, beyond some country-specific studies (Banks 1955;Savoie 2013). As post-elementary studies are closely related to knowledge access and human capital formation, we believe that this gap severely limits our understanding of growth and development. 14 Diebolt et al. (2019Diebolt et al. ( , 2021 noted that skill-biased technological change stimulated adult learning and hence the demand for intermediate human capital in 19th-century France, but enrolment rates remained relatively modest. In Germany, research has predominantly focused on practical or technical education (König 1993). Using county-level data for 19th-century Bavaria, Semrad (2015) shows the relevance of modern secondary education for economic performance while Dittmar and Meisenzahl (2020) find that modern research universities played a decisive role in the German industrialisation. 15 Notwithstanding the 11 At the turn of the twentieth century, public instruction represented 1.4% of the national budget. As Comín (1996:30) put it, education was "somewhat neglected". In 1901, the Ministry of Instruction and Fine Arts was created. See also Espuelas Barroso (2013). 12 Although it is difficult to quantify, it has been estimated that at the turn of the twentieth century around a quarter of the elementary schools and nearly 80% of secondary schools were somehow related to the Church (García Regidor 1985). Castells (1973) and López-Sidro López (2003), on the other hand, provide extensive evidence of the resurgence of religious associations in late nineteenth century. Interestingly, and as a result of the secularisation of education in France, several French institutes moved to Spain. 13 Enrolment in secondary education in State schools did not overcome that of the private ones until the 1970s. Nowadays, around 70% are enrolled in State schools which is relatively low when compared to other developed economies. Garcia-Uribe et al. (2020) have recently shown the relevance of the so-called religious question in early twentieth-century Spain. 14 Learned and scientific societies or public libraries can also improve knowledge access. For example, Karger (2021) examines the educational and economic impact of the construction of public libraries, funded by Andrew Carnegie, in the USA from 1890 to 1921. Also, there is a rising literature on the relevance of universities for economic growth (Valero and Van Reenen 2019;Urquiola 2020). 15 In Germany, a distinction between traditional (Gymnasium) and modern (Gewerbeschule, Realschulen) secondary education is often made (Semrad 2015). In any case, efficiency gains not only results

3
Starting high school? On the origins of secondary education… significance of industrial or technical knowledge for innovation, limited access to post-elementary education remained an obstacle until the second half of the 20th century.
Second, this study contributes to the literature that has set out to explore the role of religious education, as well as private and grassroots initiatives, in human capital formation. First, our work links directly with the contribution of West and Woessmann (2010) in which it is argued that countries where Catholicism was the official religion in 19th century, private (catholic) schools proliferated less, thereby reducing school competition which could have long-term repercussions on educational outcomes. A recent study by Squicciarini (2020) has suggested that religiosity slowed down the adoption of a technical curriculum in primary schools, thereby affecting industrial development in 19th-century France. Kelly (2021:1), however, notes that Catholic schools were mainly located in "impoverished places where it [education] was otherwise unavailable". Therefore, rather than retarding economic development, Catholic schools emerged wherein official or public education did not. In Spain, given the limited capacity of State or official education, private initiatives may fill in. 16 Nevertheless, a school is a costly enterprise and pupil shortage a concern. Moreover, secondary studies demand better-trained teachers than elementary instruction. In a context where illiteracy and poverty were widespread, the prospects of operating a school might have been small. Furthermore, the 19th century was marked by the rise of educational movements, but not all have the local economic, social or political support to undertake this enterprise. As we will show, private religious schools did not only proliferate in constitutionally Catholic 19th-century Spain, but they did so mainly following demand-related factors. Even more, and as qualitative studies have shown, Catholic schools adapted to the new educational demands (Fullana and Ostolaza 2007).
The article is thus structured as follows. Section 2 portrays the historical context. Section 3 describes the data sources used and explain the empirical methodology followed. Results are then presented in Sect. 4 while a final discussion is offered in Sect. 5.

Historical background
Even though from liberal sectors the establishment of an intermediate level of education aimed at forming productive workers and cultured individuals had been proposed since the early 19th century, "secondary education has never existed" in Spain, as one government official famously said. 17 In 1845, a new education plan, the Pidal Plan, was enacted. Since elementary schooling was under the auspices 16 On competition between State and private enterprises, see Friedman (1962) and Friedman and Friedman (1980). 17 Gil de Zárate (1855: 23). from innovation and technological progress, but general education may also affect other dimensions, i.e. management practices (Bloom and Van Reenen 2010).
Footnote 15 (continued) of local authorities, this reform aimed at secondary and higher education, thereby introducing a curriculum and State schools for each level. 18 Secondary education was structured in elementary (5 yrs.) and extended which had two itineraries: arts and sciences. Likewise, a public examination system was put into place to access teaching (Benso 2002;Insa-Sánchez 2022). With respect to higher education, only State universities and advanced schools were allowed, thereby limiting private initiatives to secondary studies and elementary instruction. 19 Besides, each of the 49 newly created provinces would have an Instituto (Art. 57), preferably in the capital. According to Antonio Gil de Zárate, the bureaucrat in charge of the reorganisation of the secondary education system with the Pidal Plan, the objective of this territorial approach was to build a base that could progressively feed on more teachers and more students, thus gradually increasing the number of high schools (Gil de Zárate 1855). However, the new system had to face several problems that prevented this ideal situation from happening. In the first place, in many provinces high schools had to be accommodated in buildings with other uses-generally shared with other areas of the administration-given the lack of adequate spaces for conducting teaching activities. Secondly, the recent creation of the access to teaching system caused that, during the first years after the approval of the Pidal Plan, there was still not a significant number of teachers trained for it. In addition, and even if there were spaces and teachers, on many occasions the financial situation of the schools made it difficult to acquire teaching materials that would facilitate the pedagogical task (Gil de Zárate 1855). Far from being solved, these problems persisted over time and eventually the number of public high schools remained practically constant throughout the second half of the 19th century (see Table 1).
In any event, the truth is that the Pidal Plan paved the way to State-regulated education ("Education is not a commodity that can be left to the greed of speculators… There is a social interest in education, of which the government is the guardian…"), which ignited a sense of uneasiness within conservative sectors (Ruiz Rodrigo and Palacio Lis 1983). 20 It is worth remembering that the Church, through religious institutes or dioceses, run a large part of the existing centres, from elementary schools to universities. The Pidal Plan not only pushed private (mostly religious) initiatives out of higher education, but it also reduced the freedom to open new schools by imposing strict requirements on new initiatives. Besides, religious institutes had just been suppressed and their property disentailed, whereas certain privileges (tithe, 18 In the Pidal Plan (Art. 52) State schools are defined as those "entirely or partly funded by public funds and exclusively managed by the government". By public funds, they were referring to property rents, taxation, fees or government funds (Art. 53). 19 By 1845, only the universities of Barcelona, Granada, Madrid, Oviedo, Salamanca, Santiago, Sevilla, Valencia, Valladolid and Zaragoza were recognised. The universities of Canarias, Huesca or Toledo, for instance, were converted into Institutos. 20 Inspired by previous developments, and by the then general director of studies Antonio Gil de Zárate who actively collaborated with minister Pedro José Pidal in the presentation and drafting of the final text, the Pidal Plan was a major step towards the development of a uniform and hierarchical education system in Spain. etc.) had been abolished. 21 The mounting conflict between Church and State was somehow appeased with the signing of a Concordat with the Holy See in 1851. In this accord, however, the Church regained lost ground. Catholicism was ratified as State religion (Art. 1) and, more importantly, all teachings had to be in accordance with the dictates of the catholic doctrine. The ecclesiastical hierarchy was empowered to supervise in situ whether this was observed (Art. 2).
Within this context, the Public Instruction Law (or Moyano Act) was enacted in 1857. 22 The Moyano Act basically put together most of the reforms that had been passed to articulate an education system. Secondary education was therefore organised in general and applied studies. After completion of the general studies (5 yrs.) students could take an examination to earn the Bachiller de Artes degree, which was an entry requirement for higher education: faculties (law, medicine, etc.) and advanced schools (engineering, etc.) (see Table A.4). 23 Similarly, applied studies, which were aimed at the learning of practical skills, conferred the Perito title. Besides, each province was expected to have an Instituto, as the Pidal Plan had already prescribed, whereas private centres were requested an explicit governmental authorisation. Still, religious institutes were exempted from some of these stringencies, thereby introducing asymmetries within the private sector. 24 In addition, a form of private tuition in which students learned through private preceptors (enseñanza libre), was also permitted. Yet, Institutos ensured quality control as students had to pass the official examinations to earn a degree. 25 Although several reforms were introduced during the Sexenio Democrático (1868-1874), the restoration of the Bourbon monarchy in 1874 marked the late 19th century. Catholicism was reaffirmed as State religion in the Constitution of 1876 which also guaranteed that "everyone is free to choose their profession and learn it as they see fit. All Spanish nationals may establish and support educational centres in accordance with the laws" (Art. 12). In 1880, an educational reform (Lasala Plan) eliminated the minimum entry age and instituted a new curriculum (5 yrs.) (Díaz de la Guardia Bueno 1988). 26 Secondary studies thus became shorter and hence cheaper, whereas private education enjoyed further benefits. 27 In 1887, the Associations Act guaranteed the "freedom of association", thereby establishing a legal framework for political parties, trade unions, learned societies or religious associations, among others. Thus, and considering the limited financial capacity of the State, the supply of secondary education largely depended upon private initiatives within which Catholic or Church-related ones rapidly emerged. As Fullana and Ostolaza (2007) point out, the proliferation of Catholic schools is closely linked to the interplay between local forces and the Church (dioceses, religious institutes). 28 By 1901, the composition of secondary education had rapidly changed ( Fig. 1), while a good number of religious institutes devoted to education had settled in the country. 29 In response to this conservative stance, and inspired by the Krausist philosophy, a group of well-known university professors created the Institución Libre de Enseñanza (ILE) in 1876. 30 The ILE was an educational project aimed at radically transforming education. Students did not follow the curriculum or textbooks mandated by the government. Although their impact was limited as students had to go through the official examination to earn a Bachiller de Artes degree, their members actively participated in the debates that brought about profound reforms in early 20th century. In 1901, the Ministry of Instruction and Fine Arts had been created. 31 Secondary education, and also technical training, was thereafter reorganised while the age of compulsory schooling was raised from 10 to 12 years in 1909. Likewise, a law was enacted in 1910 (Ley del Candado or Padlock Law) in order to prevent the opening of more religious houses. Table 1 shows some descriptive statistics. Bearing in mind that population aged 10-16 years ranged from around 2-3.5 million during the period, the crude enrolment rates were low. 32 Still, it is worth stressing that the Bachiller de Artes degree was a prerequisite to pursue advanced studies and, in some cases, to access the civil 27 Teachers from private centres began to form part of examination boards. Similarly, and although repealed a year later, a royal decree, enacted in 1885, permitted, under some conditions, the assimilation of private centres as officials or Institutos. This essentially benefitted large and long-established centres, basically religious ones at the expense of other (smaller) private centres. In 1888, a royal decree prohibited the undertaking of official examinations in private centres, which had become a common practice. 28 For a specific account on the case of Guipúzcoa (Basque Country) and the Balearic Islands, see Fullana and Ostolaza (2007). 29 For example, de la Salle Brothers (1878), Marists (1888), Marianists (1893) and Salesians (1893) (López-Sidro López 2003: Appendix I). Likewise, using the information published in the Anuario estadístico de instrucción pública (curso académico 1899-1900) we find that nearly 70% of the 608 colegios incorporados had a religious name. For an overview of the resurgence of religious institutes in 19th-century Spain, see (Cárcel Ortí 1980). 30 Inspired by German philosopher Karl Christian Friedrich Krause (1781-1832), Krausism was a 19th educational current that advocated for academic freedom, that is, implementing learning and teaching processes without limitations or impositions that allowed to move away from the dogmatism that, in their opinion, prevailed. 31 The government also issued a decree (Royal Decree, Apr. 12, 1901) to reinforce the official examinations and hence guaranteed that secondary and higher education followed some standards. 32 In Spain, schooling was compulsory until 9 yrs. (1857-1912); 12 yrs. (1912-1964); 14 yrs. (1964-1990) and 16 yrs. (1990-). When compared to other countries, see Figure A.1 in appendix, it can be seen that enrolment in secondary education was for most part of the twentieth century relatively low.

3
Starting high school? On the origins of secondary education… service (Díaz de la Guardia Bueno 1988). In particular, the number of students doubled from 1857 to 1901 and its composition sharply changed (see Fig. 1). While two thirds of students attended Institutos in 1857, this pattern had been reversed at the turn of the 20th century. In fact, the total number of official students was somewhat similar. 33 Relatedly, and although the economy as a whole did not experience a deep structural transformation, further change occurred especially regarding communications and transport which stimulated the process of national market integration (Rosés et al. 2010). For example, the broad-gauge railway network was nearly completed in 1901. Also, it has been argued that the Disaster of 1898, or the loss of the last colonies (Cuba, Puerto Rico, Philippines) was a turning point in the history of Spain (Betrán and Pons 2020).

Sources and data
To study the extension of secondary education from 1857 to 1901, we built a dataset with information on State (or Institutos) and private schools. Using census years as reference (1860,1877,1887,1900), we first digitised school-level information drawing from a wide array of sources. Regarding Institutos, historical information is widely accessible in Anuarios Estadísticos (or Statistical yearbooks) and the Escalafón general de catedráticos de instituto de segunda enseñanza published in 1861, 1876 and 1885 (Ministerio de Fomento 1862, 1876, 1885. 34 Besides, we used the 1889 and 1900 instalments of Anuario estadístico de instrucción pública (Ministerio de Instrucción Pública y Bellas Artes 1889, 1901) for 1887 and 1900 (See Figure  A.3 in appendix). In short, there were 55 Institutos in 54 municipalities in 1857, as two of them were located in the capital city of Madrid. Out of the 49 provinces all had at least an Instituto, often located in the provincial capital except for Cádiz, Canarias, Coruña and Guipúzcoa. 35 By 1901, all provincial capitals had an Instituto and some municipalities witnessed the opening of a new public school, amounting to a total of 59 Institutos. 33 The number of students enrolled in higher education was approximately half of those enrolled in secondary. Regarding applied studies, several efforts were made to establish arts and crafts schools (Escuelas de Artes y Oficios), particularly in the 1890s. Consequently, the number of students grew rapidly, reaching a total of 17.375 by 1900 (Lozano López de Medrano 2014: 167). Similarly, and according to the Anuarios Estadísticos, the number of students in seminaries remained relatively unchanged, ranging from 8,000 to 11,000. 34 The earliest Statistical yearbook was published in 1858 by the recently created Comisión de Estadística general del Reino that preceded the Instituto Geográfico y Estadístico and the Instituto Nacional de Estadística (INE). The Escalafón, however, listed all active secondary education catedráticos according to their seniority and merit (Insa-Sánchez 2022). 35 In these cases, the Instituto was in Jerez de la Frontera, San Cristóbal de la Laguna, Santiago de Compostela and Vergara, respectively. Also, there were Institutos in Baeza (Jaén), Cabra (Córdoba), Figueras (Girona), Osuna (Sevilla) and Tudela (Pamplona).

Fig. 1
Composition of secondary education (general studies) by type, Spain 1857-1901. Note: Official refers to students enrolled in Institutos, whereas Private-CE and Private-EL stands for students enrolled in private schools and those opting for private tuition (tutors and small academies), respectively. Source: Núñez (2005 : Table 3.5). With respect to privately funded and managed schools, the recollection of information is far more complex. Although the statistical yearbook of 1858 specifies 55 schools, it does not provide further details, such as their name or location. In order to obtain this information, we use the Anuario histórico-estadístico-administrativo de instrucción pública (Gaceta de Madrid n.d.), published in 1873-1874. This is one of the few quantitative sources on secondary education for the 19th century (Pan- Montojo 1993) and, as far as we are aware, the earliest one with comprehensive information on the officially recognised (incorporados) private schools. In particular, it offers the name of the school; municipality where located; Instituto where incorporated; number of students and date of foundation. Since the year of foundation is known, we use this information to fill in the gaps from previous sources. That said, it is likely that the number of schools could have been underestimated since some, mainly small family-owned academies, could have decided not to incorporate and hence students would be under the heading of enseñanza libre.
Then, we also collect information for 1874, 1887 and 1900. As previously said, the Anuario histórico-estadístico-administrativo de instrucción pública offers a detailed list of all private schools in 1873-74. For 1887 and 1900, we have digitised the Anuario estadístico de instrucción pública (Ministerio de Instrucción Pública y Bellas Artes 1889, 1901), published yearly between 1889 and 1910. 36 This official publication includes detailed information on the name of each school; municipality where located, Instituto where incorporated and, in most cases, the number of students. For those in Madrid and Barcelona, the postal address is also given. Similarly, though only in some cases, it is mentioned whether a centre is run by a religious institute (Piarists, Jesuits, etc.). Yet, this is not consistently reported and hence does not allow us to delve further into the matter. Figure 2 shows the number of municipalities with an Instituto or a private school, while Map 1 depicts the education system resulting from the Moyano Act and municipalities with direct access, or a private school, in 1857 and 1901. As a hierarchical structure, Spain was divided in 10 university districts where rectors were the leading educational authority. 37 The Moyano Act also introduced uniformity, as the curriculum and textbooks were decided at the highest level. 38 Figure 2 confirms the rapid expansion of schools in late 19th century. Interestingly, around a third of the municipalities with an Instituto had no private schools at the end of the period of study. Moreover, and as expected, private education targeted large cities. By 1901, there were 111 and 46 centres in Madrid and Barcelona, respectively.
Then, the unit of analysis in this study is the municipality, the lowest administrative unit in Spain. Using the population censuses (1860, 1877, 1887 and 1900 2019), pseudo-municipalities were created to account for cases with territorial alterations. The dataset thus contains 7,905 municipalities. Using cartographic resources from the Instituto Geográfico Nacional (IGN), municipalities were then georeferenced, thereby permitting the computation of time-invariant variables such as surface, elevation and geodesic distances. 39 Additionally, the existence of educational centres prior to 1857 must be taken into account. To assess continuity in the spatial distribution, we gathered information on active universities in the late Old Regime. In doing so, we have contrasted information contained in the Real Cédula, Jul. 12, 1807; Gil de Zárate (1855) and Rodríguez San Pedro Bezares (2000) to identify them. 40 Overall, we find 34 municipalities that hosted a university at some point in early 19th century. (For a complete list, see Table A.1 in Appendix). To control for this, we compute the shortest distance from a given municipality to any of these. Likewise, it is known that the Church played a relevant role either funding or managing centres (seminaries, colleges, etc.) and that its presence had an enormous impact. We have thus reconstructed the ecclesiastical administration to compute the shortest distance from a municipality to a seat of a diocese (see Table A.2 in Appendix), which was the hub of Church-related activity. 41 Lastly, as the development of an education system is one of the pillars of the Liberal State (Pro 2019), we assess the role of the administrative structure. 42 For this, we control for the first level or provinces (provincias) and the second level or judicial districts (partido judicial). As the administration and judicature were instituted in the capitals of provinces and judicial districts, it is likely that State infrastructures influenced the entry decision of private initiatives.

Methodology
As shown above, the capacity of State schools did not change much from 1857 to 1901, but the number of students in secondary education doubled. In this study we 39 We have computed the distance from each municipal centre to its closest seaport. As seaports had distinct relevance, only seaports with a customs office, as specified in the statistical yearbook for year 1858 (Comisión de Estadística General del Reino 1859), are considered. Seaports with customs office were classified in classes according to their capacity. All seaports were allowed to export goods abroad, but only those in the first and second class were allowed to import goods. However, as all seaports with customs were authorised to host cabotage, we compute the distance to the closest seaport with customs office of any class. Similarly, we have also computed the distance from each municipal centre to the nearest Instituto and seminary in 1860, which in essence it is seat of the diocese. 40 The Real Cédula, Jul. 12, 1807 aimed at restructuring higher education by reducing the number of centres and implementing a curriculum for all (Gil de Zárate 1855; Lorente 1999). In addition, it offered information on the existing centres. Similarly, Gil de Zárate (1855) is a seminal reference on the history of education. 41 The ecclesiastical administration in 1857 has been reconstructed using the Mapa eclesiástico de las las diócesis de España y adyacencias and the Concordat of 1851. 42 For an overview of the process of creation of provincias, see Burgueño (2011).

3
Starting high school? On the origins of secondary education… thus examine the expansion of non-official or private schools. With this in mind, the decision to open a private school in a specific municipality can be somehow compared to the decision of a firm to enter a market. In this way, when a firm operates it is signalling, through revealed preference, that it is profitable to exist, not only in accounting terms but also in economic ones. Yet, this can be analysed considering not only the firm's characteristics but also, and in a decisive way, the strategic behaviour that other firms could adopt (Berry and Reiss 2007). Leaving prices and quantities aside, this approach makes use of intrinsic features of the market and aspects related to the degree of market competition as explanatory variables (Bresnahan andReiss 1990, 1991;Seim 2006). Furthermore, the decision to open a private school might not only respond to the demand. Education is normally related to the transmission of knowledge and skills, but it also conveys the dissemination of specific values. Therefore, when funding and teaching are separated it is worth noting that the preferences of benefactors regarding educators mattered. In Spain, private initiatives normally required the support of wealthy families and local councils to acquire the materials, equipment and facilities, to begin operations. Then, if some educators, such as Church-related initiatives, were more aligned with the preferences of the benefactors it could have affected the decision.
That said, our dependent variable y captures a new entry in municipality i over period t (1860-77; 1877-87; and 1887-1900), thereby taking the value of 1 if a new private school appeared and 0 otherwise. Then, we have a dataset with 7,905 municipalities and 3 waves (1877, 1887 and 1900) since we use information from year 1860 as the first lag. Panel data is particularly interesting for such an analysis as it permits the isolation of time-invariant effects, thereby mitigating possible omitted variable bias. Considering that our dependent variable is a binary variable, and in order to exploit the information gathered, we use a random effects probit model Blue circles, on the other hand, represent Institutos in provincial capitals, whereas yellow circles show non-capital municipalities with an Instituto.
Orange circles show provincial capitals without an Instituto. Finally, black dots illustrate municipalities with at least one private centre. Source: see text 1 3 Starting high school? On the origins of secondary education… in order to be able to capture the unobserved individual effects of each municipality. The specification is as follows: where Φ is the normal cumulative distribution function (CDF), X it is a vector of explanatory variables, Z i is a vector of time-invariant observed heterogeneity while α i captures the time-invariant unobserved heterogeneity, γ t accounts for year-fixed effects and u it is the error term. For the sake of simplicity, we classify explanatory variables into three categories. First, the demand for education is proxied with population size and male literacy (as students in secondary education during the period of study were essentially males). It is expected that larger and more literate municipalities would be targeted. Equally, socio-economic dynamism might stimulate the demand. To capture this, we use municipal population growth.
We also control for the administrative structure and the degree of competition. On the one hand, a variable is included to capture whether a municipality was the seat of a judicial district. As the lowest level of the judicature, these municipalities became focal points of the economic, social and cultural life, and the nodes of the information network. Additionally, the presence of an Instituto or a private school might deter private initiatives. To measure this, we include a set of variables to capture the presence of an Instituto, a private school, and also, whether a private school existed within the judicial district at the beginning of each period. Finally, we include a vector Z i of time-invariant control variables which includes municipal surface, elevation and a set of distances to the nearest port, seat of university district, Instituto, Seminario, and seat of Old Regime university. We also include fixed effects for the 10 university districts (distritos universitarios) stipulated in the Moyano Act of 1857. Considering that the university rector was the highest academic authority, this should help us to control for the specificities of each district. As an additional geographic control, we introduce a quadratic polynomial on latitude and longitude as a way of controlling for unobserved location-specific characteristics.
Likewise, since industrialisation was already under way, we control for a number of variables related to the socio-economic context. First, we control for the share of the employment in agriculture. Although this is not available at the municipal level, we use judicial district-level data. 43 Therefore, the share of employment in agriculture of a given judicial district is assigned to the municipalities belonging to it. Structural change at the national level was somewhat slow (see Table 1), but it is worth remembering that there were sizable territorial disparities. Then, it is possible that industry and services could have further influenced the entry decision. In this regard, Rosés (1998) found that the pre-existing stock of human capital was fundamental for the adoption of technology in Catalonia between 1830 and 1861. Yet, it seems that only relevant human capital, essentially that acquired informally and on-the-job training, mattered. Second, we control for railways accessibility, measured as the distance (in hours) from a municipality (1) P y it = Φ β 0 + β 1 X it + β 2 Z i + α i + γ t + u it 43 The Spanish population censuses of 1860 and 1887 offer detailed information at the judicial district level, including occupational structure. For the census of 1877, we have interpolated the values found in 1860 and 1887. to the nearest station or stop (Esteban-Oliver 2020). Railways were one of the main signs of modernity and a crucial technology in the economic and political integration that came along industrialisation. Also, better transport, by facilitating the transmission of information, might stimulate further change. Then, if private initiatives targeted more modern places a negative relationship should arise. Table 2 shows the results for Eq. (1) using a panel probit model for which the average marginal effects (AMEs) are reported. In column (1) the results for the baseline model are shown, whereas in columns (2) and (3) we include time-invariant observed heterogeneity and time fixed effects. The empirical analysis is limited, due to data availability, to peninsular Spain, thereby excluding the Balearic and Canary Islands. The number of municipalities in each wave (1860-77; 1877-87; 1887-00) thus drops to 7,763. For a summary of descriptive statistics, see Table A.3 in appendix. In addition, a measure of the goodness of fit, McFadden's Pseudo-R 2 , computed as the difference between the model's log-likelihood and that of the model with a constant only, is also reported for all regressions.

Results
The results can be summarised in three central ideas. First, private initiatives targeted large, more literate and dynamic places. Irrespective of the specification, the probability of opening a school was greater and statistically significant in municipalities with a large potential. As State education remained relatively unchanged during the whole period of study, it appears that private enterprise responded to local demands and filled in the gaps. Relatedly, not only size appears to matter. Judicial district capitals were, on average, much more likely to witness a new private school. As previously said, being the seat of a judicial district (cabeza de partido) had a great relevance since they were the pillars of the recently created Liberal State, in terms of presence of administrative and judicial institutions. 44 Understandably, and since post-elementary education was still open to a narrow elite, these municipalities became a target.
Secondly, and in line with the above findings, the existence of an Instituto or a private school reduced the probability of a new entry. This apparent lack of competition, except in the large cities (Madrid, Barcelona), might signal a rising demand for secondary education across space which raises further questions on its provision. Neither State nor private education was free of charge. 45 That is, not all could afford 44 While the number of provincial capitals remained unchanged (49) during the period of study, 1860-1900, the seats or capitals of judicial districts ranged from 471 to 476. 45 Between 1857 and 1887, Institutos were essentially funded with their own resources (enrolment fees, rents, etc.) and/or by a local/provincial body (Diputación provincial, Ayuntamiento, etc.). By 1887, expenditure on secondary education, including catedráticos's salaries, was incorporated by law into the budgetary plans of the government, while the debt contracted by the Institutos was seized in 1890. Notwithstanding this effort to financially support and secure Institutos, the total expenditure on secondary education did not increase from 1887 to 1901 (Díaz de la Guardia, 1988: 465-66). Then, the govern-

3
Starting high school? On the origins of secondary education… these educational services. Still, as the middle class was eventually dragged (Sirera Miralles 2011) accessibility remained an obstacle to human capital formation. From a business perspective, a school is a costly and risky enterprise. Besides, within a context in which illiteracy is widespread the potential pool of teachers should be limited, thereby raising the cost of provision (Andrabi et al. 2013). Even more, and following the Moyano Act, entry regulation was asymmetric. While secular initiatives had to comply with certain requirements, religious ones enjoyed exceptions.
Then, understanding the interplay between local forces (funding) and educators (teaching) is at the core of the matter. As the "freedom of association" was guaranteed (Constitution of 1876; Associations Act of 1887) it seems that the expansion of private schools came along with the revival of the Church. In fact, given the mounting anticlerical movements that were pushing for secularisation across Europe, Spain became a haven for religious institutes. Invited, and often funded, by local authorities or affluent families, the number of religious houses devoted to education (elementary, secondary) rapidly increased (Castells 1973). 46 This is the case of the Jesuit school San José in Valladolid which received a private donation in 1881; or the Rocafort La Salle school in Barcelona under the patronage of the aristocrat Dorotea de Chopitea. Given the conditions, several Catholic institutes and associations found its mission in education.
Finally, we also assess whether the lack of progress and change, measured through the distance to the railways and agricultural employment, had an effect on the creation of new schools. Spain was still an agrarian economy at the turn of the 19th century, but progress and change occurred during the period of study. By 1901, the broad-gauge railway network was nearly completed, whereas industrialisation was underway though spatially concentrated in certain territories. Yet, the inclusion of such controls does not modify the behaviour of the main variables. It can be argued that vocational or technical training, instead of general studies as the ones we are focusing on in this paper, were of greater relevance. In fact, and although many industrial schools located in places with a manufacturing tradition, 47 Institutos usually endowed specific chairs (or cátedras); and even private schools, including ment, through the advisory board of the Real Consejo de Instrucción Pública, essentially regulated matters related to curriculum and textbooks.
Footnote 45 (continued) 46 It has been estimated that at the turn of the twentieth century around 50% of the male regular clergy was involved in education (Morote 1904). The secularisation of public instruction in other countries reinforced this process. In France, for instance, the Churches and State were separated in 1905. Unsurprisingly, several French religious institutes devoted to education (de la Salle Brothers, Marists, Marianists, etc.) opened houses in late nineteenth-and early twentieth-century Spain. As ecclesiastical historians have shown, the institutes devoted to education were in most cases foreign ones (Faubell Zapata 1997). 47 For the whole country, Lozano López de Medrano (2014) finds 24 and 67 technical schools in 1880 and 1895, respectively. Still, 15 out of the 24 in 1880 and 40 out of the 67 in 1895 were located in provincial capitals. That is, accessibility to technical training was even more limited than to general studies. See also Riera i Tuèbols (1993).

Robustness checks
In this section, we carry out some robustness checks to strengthen the empirical analysis. First, given that there is a vast number of small municipalities where it is unlikely that private initiatives emerged, the sample is restricted to those larger than 1000, 2500, 5000 and 5000 inhabitants without Madrid and Barcelona, see columns Table 2 Main results (whole sample) Dependent variable: New entry of a private centre in a municipality Probit (margins dy/dx). The timeinvariant control variables include: ln municipal surface; ln municipal elevation; ln distance to nearest port; ln distance to nearest seat of university district; ln distance to nearest Instituto; ln distance to nearest Seminario; ln distance to nearest seat of an Old Regime university; quadratic polynomial on latitude and longitude; and university district fixed effects. Standard errors clustered at the province level. Significance levels: * p < 0.10, ** p < 0.05, *** p < 0.01. (1) (2)  (2007) argued that Catholic schools and modernisation went hand in hand in certain territories.

3
Starting high school? On the origins of secondary education… (4), (5), (6) and (7) in Table 3. 49 All specifications include time-invariant observed heterogeneity and time fixed effects. It is worth stressing that cities and towns are also more likely to be less agrarian and have better rail accessibility. In general, the results are in line, in terms of sign and statistical significance, with those in column (3). Still, once we restrict to the largest municipalities (more than 5,000 inhabitants, column 6) both the effect of population growth and competition, measured with the presence of private schools, vanishes. In the latter case, this might indicate that there was further room for more centres. More importantly, the effects remain sizable despite the restriction and are unaltered when dropping Madrid and Barcelona Table 3 Main results on a restricted sample of large municipalities Dependent variable: New entry of a private centre in a municipality Probit (margins dy/dx). Socio-economic change controls include the share of agricultural employment at the judicial district level and a measure of the vicinity to the closest railway station. The time-invariant control variables include: ln municipal surface; ln municipal elevation; ln distance to nearest port; ln distance to nearest seat of university district; ln distance to nearest Instituto; ln distance to nearest Seminario; ln distance to nearest seat of an Old Regime university; quadratic polynomial on latitude and longitude; and university district fixed effects. Standard errors clustered at the judicial district level. Significance levels: * p < 0.10, ** p < 0.05, *** p < 0.01.
(4) (5) (6) (7) Population ( (column 7), the largest cities. Even now, the seats of judicial districts were much more likely to witness a new entry, while municipalities with an Instituto, essentially provincial capitals, were less. In this case, the decrease in the Pseudo-R 2 measure can be explained by the progressive decrease in the size of the sample in the different specifications and the fact that it gets restricted to increasingly larger municipalities, which may reduce the explanatory capacity of the model insofar as it does not include specific circumstances that could have operated in the different cities. Likewise, we perform another robustness check by including municipal population density instead of population while dropping population growth. Table 4 shows that, as expected, population density exhibited a positive and statistically significant relationship. Similarly, our previous findings also arise. 50

Conclusions
The transition from agrarian societies to industrial and service economies not only brought about profound socio-economic changes, but it also increased the demand for knowledge and skills. Then, understanding how the supply responded is paramount. In this study, we have looked at the early years of secondary education in Table 4 Main results with population density as a regressor As above in Table 3. Significance levels: * p < 0.10, ** p < 0.05, *** p < 0.01. (1) (2) Spain, which offers a riveting account on the challenges that a weak State may face to broaden access. By 1857, a curriculum for each educational level and an infrastructure of State schools (universities, Institutos, etc.) had been created. Although poverty, illiteracy and gender discrimination, among other factors, limited enrolment the supply of State education soon proved inadequate as the expansion of private schools in late 19th century suggests. Following demand-related aspects, Catholic and secular schools rapidly spread across space following the demand for education. However, direct access was still limited at the turn of the 20th century. 51 Poor accessibility has relevant implications. In the case of 19th-century Spain, those living in places without direct access and willing to pursue post-elementary education had to move out or opt for private tuition, essentially a private preceptor or a small school. This can partly explain the modest enrolment rates, thereby affecting human and social capital formation. Still, secondary education required a demanding infrastructure (buildings, teachers, books, etc.) that could also have raised awareness of upcoming societal changes and generate knowledge spillovers across members of the community. In this way, Institutos and private schools were not just learning spaces, they also played a central role as agents of change. In fact, and as the demand for education grew, several of these initiatives rapidly grew, and even converted into boarding schools.
Yet, the funding of this infrastructure was a costly and risky venture. It is likely that private initiatives received financial support from the local community which in turn points to the interplay between local forces and educators. Although our data do not permit a comprehensive assessment, the mounting significance of Catholic schools deserves further attention. On the one hand, it can be argued that local forces (council, wealthy families, etc.) preferred dioceses and institutes (or congregations) as educators. It is worth remembering that entry restrictions were far less restrictive than those for secular educators. Similarly, the Church was struggling to find its way in this changing environment. Then, and as qualitative studies have pointed, Catholic schools not only filled in the gap, they also actively participated in the transmission of bourgeois values (Fullana and Ostolaza 2007:213).
Still, there are several potential avenues for future research. First, it is unclear whether the demand for secondary education was fulfilled. For this, detailed information at the individual and school level is needed. Besides, Catholic schools might have deterred secular initiatives. Without the existing legal asymmetries, the entry costs of the former would have been higher. Equally, and since teachers in Catholic schools were not requested a qualification, it would be interesting to examine whether teachers' quality had an impact on performance. That is, whether the examination failure rates differed between schools. Second, and in order to delve deeper into the matter, the entry mechanism should be better understood. Some schools resulted from individual or corporate initiatives while others opened upon request.

3
In this regard, the role played by civil authorities and wealthy families was paramount, as the strategic behaviour of dioceses or institutes. This study can thus be regarded as a preliminary effort in this line of thinking.
Much has been debated on the relevance of human and social capital for economic growth and development. While worldwide literacy is near completion, it can be argued that having a skilled labour force and a knowledgeable society is still a work in progress in many places. Notwithstanding the relevance of curriculum, textbooks or teachers' quality, it appears that broadening access to post-elementary education was critical. Not only because many families could not afford to send their children away, the existence of secondary or high schools may further stimulate the social demand for education. In Spain, as in other countries, the limited scope and capacity of State education gave way to grassroots initiatives. Catholic and secular schools coexisted, yet the former rapidly overcame the latter ones, in a process that would be reinforced later during Francoism (1939-75). As with the high school movement, grassroots movements rather than top-down action marked the early stages of secondary education in Spain. In addition, local forces aligned with the Church which in turn found its mission in this new world.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.