The political appointment of bureaucrats, a ubiquitous phenomenon around the world, is typically seen as a rent-seeking strategy whereby politicians sustain clientelistic networks and manipulate public administration to their advantage. I argue that political appointments can also increase bureaucratic accountability and effectiveness in public service delivery because they provide political and social connections between bureaucrats and politicians. These connections provide access to material and immaterial resources, enhance monitoring, facilitate the application of sanctions and rewards, align priorities and incentives, and increase mutual trust. Patronage therefore works as a governance technology. In certain conditions, especially in developing contexts where politicians value the delivery of public services but cannot access other tools to motivate bureaucrats to perform, the benefits of political appointments may outweigh the costs. I test this theory with data on municipal governments in Brazil, leveraging two quasi-experiments with administrative data for schools in the whole country (a difference-in-discontinuities and a regression discontinuity); two original surveys including conjoint experiments in one state (a face-to-face survey of 926 street-level managers and an online survey of 755 politicians); and 121 in-depth interviews with bureaucrats, politicians and anti-corruption agents. The findings challenge the traditional view of patronage as universally detrimental for development, and draw attention to how bureaucrats and politicians can leverage political appointments and connections for public service delivery.