OKLAHOMA CITY — Americans have never hesitated to pack up the U-Haul in search of the big time, a better job or just warmer weather. But these days, domestic migrants are increasingly driven by the quest for cheaper housing.

The country’s fastest-growing cities are now those where housing is more affordable than average, a decisive reversal from the early years of the millennium, when easy credit allowed cities to grow without regard to housing cost and when the fastest-growing cities had housing that was less affordable than the national average. Among people who have moved long distances, the number of those who cite housing as their primary motivation for doing so has more than doubled since 2007.

Rising rents and the difficulty of securing a mortgage on the coasts have proved a boon to inland cities that offer the middle class a firmer footing and an easier life. In the eternal competition among urban centers, the shift has produced some new winners.

Oklahoma City, for example, has outpaced most other cities in growth since 2011, becoming the 12th-fastest-growing city last year. It has also won over a coveted demographic, young adults age 25 to 34, going from a net loss of millennials to a net gain. Other affordable cities that have jumped in the growth rankings include several in Texas, including El Paso and San Antonio, as well as Columbus, Ohio, and Little Rock, Ark.