Social trust underlies virtually any social and economic interaction and is a crucial ingredient for successful collective action. What causes social trust to develop, however, remains poorly understood. Institutional quality has been proposed as a candidate driver and has been shown to correlate with social trust. We provide experimental evidence for the causal direction of this relationship. We first exogenously expose the participants to institutions of different quality, defined as their ability to prevent corrupt behaviours on behalf of administrators. We then measure social trust among the participants using a trust game. We find that individuals exposed to settings with low institutional quality trust others significantly less. Moreover, using novel survey data we show that our experimental results correspond to correlational patterns usually found across countries. The paper makes a step forward in the decades-long search for the causality between institutional quality and social trust.