We explore empirically how capital inflows into the US and financial deregulation within the United States interacted in driving the run-up (and subsequent decline) in US housing prices over the period 1990-2010. To obtain an ex ante measure of financial liberalization, we focus on the history of interstate-banking deregulation during the 1980s, i.e. prior to the large net capital inflows into the US from China and other emerging economies. Our re- sults suggest a long shadow of deregulation: in states that opened their banking markets to out-of-state banks earlier, house prices were more sensitive to capital inflows. We provide evidence that global imbalances were a major positive funding shock for US wide banks: different from local banks, these banks held a geographically diversified portfolio of mort- gages which allowed them to tap the global demand for safe assets by issuing private-label safe assets backed by the country-wide US housing market. This, in turn, allowed them to expand mortgage lending and lower interest rates, driving up housing prices.