This paper uses data on house transactions in the state of Massachusetts over the last 20 years to show that houses sold after foreclosure, or close in time to the death or bankruptcy of at least one seller, are sold at lower prices than other houses. Foreclosure discounts are particularly large on average at 28% of the value of a house. The pattern of death-related discounts suggests that they may result from poor home maintenance by older sellers, while foreclosure discounts appear to be related to the threat of vandalism in low-priced neighborhoods. After aggregating to the zipcode level and controlling for regional price trends, the prices of forced sales are mean-reverting, while the prices of unforced sales are close to a random walk. At the zipcode level, this suggests that unforced sales take place at approximately efficient prices, while forced-sales prices reflect time-varying illiquidity in neighborhood housing markets. At a more local level, however, we find that foreclosures that take place within a quarter of a mile, and particularly within a tenth of a mile, of a house lower the price at which it is sold. Our preferred estimate of this effect is that a foreclosure at a distance of 0.05 miles lowers the price of a house by about 1%.