It is well-established in the research literature that authoritarianism leaves behind cultural and institutional legacies that make it difficult for countries to develop robust democratic regimes and the rule of law. Indeed, the prevailing view is that the legacies of authoritarianism are wholly negative and work as a barrier to building judicial state capacity once a transition to electoral democracy has taken place. This body of work, however, cannot explain why some countries that experienced authoritarian regimes are more successful than others in building strong and effective judicial systems in the post-authoritarian stage. I answer this question by studying Mexico (1934-2008) and Spain (1939-1978) in comparative-historical perspective. Franco’s right-wing military dictatorship in Spain was considerably harsher than Mexico’s largely left-leaning PRI-regime, with Franco exercising a degree of control over the judiciary unlike anything the PRI ever achieved. As a result, one would expect Spain’s path toward the rule of law to have been more troubled than Mexico’s. And yet, the exact opposite is true. By any measure, the Spanish judicial system is more independent, transparent, and effective than Mexico’s. It is also less corrupt and is bestowed more trust by the citizenry. While Mexico struggles to build a minimally effective judicial system, in Spain the judicial protection of civil and political rights is nearly indistinguishable from older, more established democracies. Why? I argue that the key to answering this question lies in understanding the specific mechanisms through which the executive power in each country controlled courts and judges during the authoritarian period. These mechanisms bequeathed different types of organizational structures and bureaucratic cultures to the judicial systems of these countries in the post-authoritarian era, thereby defining the political and institutional context in which legal reforms of the judiciary were attempted.