This paper uses a microfinance field experiment in two Lima shantytowns to measure the relative importance of social networks and prices for borrowing. Our design randomizes the interest rate on loans provided by a microfinance agency, as a function of the social distance between the borrower and the cosigner. This design effectively varies the relative price (interest rate differential) of having a direct friend versus an indirect friend as a cosigner. After loans are processed, a second randomization relieves some cosigners from their responsibility. These experiments yield three main results. (1) As emphasized by sociologists, connections are highly valuable: having a friend cosigner is equivalent to 18 per cent of the face value of a 6 month loan. (2) While networks are important, agents do respond to price incentives and switch to a non-friend cosigner when the interest differential is large. (3) Relieving responsibility of the cosigner reduces repayment for direct friends but has no effect otherwise, suggesting that different social mechanisms operate between friends and strangers: Non-friends cosign known high types, while friends also accept low types because of social collateral or altruism.