We propose a unified model of limited market integration, asset-price determination, leveraging, and contagion. Investors and firms are located on a circle, and access to markets involves participation costs that increase with distance. Due to a complementarity between participation and leverage decisions, the equilibrium may exhibit diverse leverage and participation choices across investors, although investors are ex ante identical. Small changes in market-access costs can cause a change in the type of equilibrium, leading to discontinuous price changes, deleveraging, and portfolio-flow reversals. Moreover, the market is subject to contagion - an adverse shock to investors in some locations affects prices everywhere.