How do state bureaucracies learn, innovate, and play a positive role in development? The book addresses such question and takes issue with the extant literature on "bureaucracy and development". It argues current approaches have mischaracterized discretion and variability in bureaucratic behavior as impediments for development. Instead, it introduces the notion of "flexible bureaucracies" and elaborates on the links between discretion, creativity, and accountability. According to this approach, internal heterogeneity and the seemingly organizational inconsistency resulting from discretion (e.g. coexistence of different understandings about work, practices, and behaviors within the same organization) create opportunities for experimentation, continual reflection on practice, as well as alternative forms of accountability on bureaucratic behavior, rather than opportunities for misbehavior and rent-seeking. The research involved subnational comparative analyses based on extensive on-site fieldwork on the Brazilian Labor Inspection Department, including detailed investigations of a sample of 27 cases of labor inspectors’ intervention in different economic sectors and states.