We study theoretically and empirically the demand for microcredit under different liability arrangements and risk environments. A theoretical model shows that the demand for joint-liability loans can exceed that for individual-liability loans when risk-averse borrowers value their long-term relationship with the lender. Joint liability then offers a way to diversify risk and reduce the chance of losing access to future loans. We also show that the demand for loans depends negatively on the riskiness of projects. Using data from a randomised controlled trial in Mongolia we find that these model predictions hold true empirically. In particular, we use innovative data on subjective risk perceptions to show that expected project risk negatively affects the demand for loans. In line with an insurance role of joint-liability contracts, this effect is muted in villages where joint-liability loans are available.