Abstract We consider an autoregressive regime-switching model for the dynamic mean structure of a univariate time series. The model allows for a variety of stationary and nonstationary alternatives, and includes the possibility of approximate long-memory behavior. The proposed model includes as special cases white noise, first-order autoregression, and random walk models as well as regime-switching models and the random level-shift model proposed by Chen and Tiao, Journal of Business and Economic Statistics, 8 (1990) p. 83. We describe properties of the model, focusing on its resemblance to long-memory under a certain asymptotic parameterization. We develop a reversible-jump Markov chain Monte Carlo method for Bayesian inference on unknown model parameters and apply the methodology to the Nile River data.