Order and the Underground uses a political ecology approach to examine local-level governance institutions in Madagascar’s artisanal and small-scale gold mining (ASGM) sector in order to better understand natural resource governance in frontier settings—that is, in spaces resting at the margins of state authority. In doing so, it aims to answer three principal questions: First, how—that is, through what institutions and processes—are ASGM sites governed in Madagascar? Second, what historical, political-economic, socio-natural conditions have shaped these institutions and processes over time and across space? Third and finally, why and how do different actors navigate local-level institutions and governance landscapes so as to contest and/or claim authority, control, access, and/or autonomy? The arguments that emerge in response are based on data from more than 14 months of ethnographic fieldwork carried out in Madagascar between 2015 and 2018; from semi-structured interviews with stakeholders across the gold economy; from archival documents housed in Madagascar’s national archives in Antananarivo; and from existing historical work, media accounts, and policy and project reports.Between one and two million Malagasy earn their livelihoods through gold mining, working deposits spread across the length of the island. Globally, ASGM employs at least 40 million people, and represents between 20 and 30 percent of global gold production. Despite its economic import, policymakers and popular media view ASGM as a problem to be solved, as a sector beset by social and environmental ills emanating from its characteristic informality and illegality. State-corporate actors, meanwhile, depict ASGM sites as chaotic landscapes devoid of or deficient in regulation, and design or prescribe interventions—often violent suppression or top-down formalization—accordingly. Contrary to such portrayals, I find that resource access and extractive activities in diggings across Madagascar are regulated, and order maintained, through local-level institutions. These institutions are conditioned, first and foremost, by the frontier context in which they operate. From at least the mid-1800s, Madagsacar’s gold economy has been shaped by a persistent set of frontier dynamics, including its informal character and imbrication with illicit trade networks; fragmented or plurified regulatory authority in ASGM sites; and miners’ resistance to elements of capitalist expansion like enclosure, technological complexification, and labor rigidification. Under such circumstances, varied stakeholders—state-corporate actors, ASGM operators, local leaders, and mining communities—have acted as territorializing agents, aiming to advance competing claims to access and authority, gold deposits and autonomy.The resulting governance landscape comprises a range of frontier institutions used for local-level management of ASGM. In Madagascar, these include (1) extended pre-existing customary institutions, (2) syncretic institutions (or adapted, top-down impositions); and (3) bricolage institutions (or novel, bottom-up constructions). These forms often coexist in overlapping, complementary, and/or competitive contexts of regulative pluralism—something I demonstrate through in-depth ethnographic explorations of three cases: Sandrazaha, Antanimbary, and Betsiaka. An important corollary to this analysis is the realization that Malagasy mining communities often conceptualize and manage goldfields as mineral commons, or collectively-held resources where exclusion is largely impracticable for both socio-cultural and techno-geological reasons. In doing so, they explicitly reject the claims made by the government and its corporate partners to exclusive state ownership of subsoil resources. This is not to say that gold diggings are naturally or inevitably commons, but that they have been produced as such over time, and are maintained as such now to varying degrees in different areas under contingent and uneven circumstances.To develop a fuller sense of where frontier institutions governing ASGM sites come from, what conditions shape their emergence and form, and how they are used to advance diverging interests, I interrogate dynamics in Betsiaka, one of the island’s best-known, longest-worked, most-productive mining regions. I trace institutional emergence, extension, evolution, and endurance in Betsiaka from the late 1800s to the present day, identifying critical conjunctural moments in which global trends, national programs, and local socio-natural, political-economic particularities have articulated to produce the governance landscape we see today. A significant component of ASGM governance Betsiaka is its gold mining Dina and the institutional complex or assemblage in which it is embedded. Dina are codified set of rules, regulations, and penalties elaborated and adopted by local communities—an element of so-called customary law in Madagascar. Conditions influencing the processes of bricolage through which the Dina institutional complex has been constructed in Betsiaka include (1) the geological context of gold in the region, and the associated socio-technical practices of extraction used in response; (2) significant in-migration of miners from different regions of the country, and the resultant local heterogeneity; (3) the discursive and material legacies of the local mining community’s formative experiences with interventions by external (state, corporate, and NGO) actors, which have played a significant role in motivating the production of local goldfields as commons; and (4) an oppositional and confrontational orientation towards the political center (and Highland Merina authority), which has driven the mining community’s use of institution-building as a form of territorialization against state-corporate hegemony.Finally, I explore the ways in which different actors navigate Betsiaka’s institutional landscape in pursuit of varying objectives through a close analysis of the apara (share) system, and through a series of vignettes illustrating the diggings five conflict strata. I show how political and economic elites (as well as some non-elite ASGM operators) work to manipulate labor and revenue-distribution arrangements and dispute resolution processes to dominate and exploit mining laborers. At the same time, mining laborers and the mining community more broadly use those same institutions, arrangements, and processes to resist domination and exploitation, to maintain resource access, to protect the integrity of the mineral commons, and to preserve local autonomy. Despite the persistence of corruption and exploitation, then, the rise and reign of Betsiaka’s Dina institutional complex and the community’s ongoing defense of its collectively-managed goldfields proffers an example of how local-level institutions of governance and the conceptualization of mineral resources as commons can create opportunities for resistance, and can aid in the production of ASGM sites as spaces of locally-organized order and autonomy.