We propose a conditional measure of capital market integration that allows us to characterize both the cross-section and time-series of expected returns in developed and emerging markets. Our measure, which arises from a conditional regime-switching model, allows us to describe expected returns in countries that are segmented from world capital markets in one part of the sample and become integrated later in the sample. Our results suggest that a number of emerging markets exhibit time-varying integration. Interestingly, some markets appear to be more integrated than one might expect based on prior knowledge of investment restrictions. Other markets appear segmented even though foreigners have relatively free access to their capital markets.