DANVILLE, Ill. — This city already was struggling when Tara Holycross and her friends were kids riding their bikes to Custard Cup and hanging out in the Wendy’s parking lot.
Manufacturers that provided thousands of well-paying, middle-class jobs — General Motors, General Electric, Hyster — were closing. Neighborhoods were crumbling. By the time that Holycross graduated from high school in 2004, a city known for its massive grain elevator was scrambling to create new opportunities.
Ten years later, Danville, population 32,500, is still struggling. But Holycross and some of her classmates are doing just fine — because they moved.
They’re living all over the country — places like Chicago, Charleston, S.C., and Boulder, Colo. — with solid jobs that reward the kind of education they have.
Holycross and four classmates who were interviewed said about half of their class of fewer than 50 left town, and those they’re in touch with landed good positions.
‘‘I knew there wasn’t an opportunity for me to have my career’’ in Danville, said Holycross, 28, a third-generation native who now works as an athletic trainer in Beloit, Wis.
Their experience is a counterpoint to the desperation gripping so many rural and manufacturing communities in the Midwest hard hit by global economic changes.
Yet the flow of educated workers from struggling communities to areas with brighter opportunities might, to some extent, help shore up the middle class, which has been squeezed by a widening gap between the richest Americans and everyone else.
Since roughly 1980, income has grown most for the top earners and dropped for the poorest 20 percent. Incomes for the highest-earning 1 percent of Americans soared 31 percent from 2009 through 2012, after adjusting for inflation, according to data compiled by Emmanuel Saez, a University of California economist. For everyone else, it barely budged.
Waves of people fell out of the middle class as manufacturing’s share of the economy shrank. Following the downside arc of the wealth gap was inevitable for many who stayed in stricken factory towns. For others, though, escaping meant separating their own fate from that of their hometowns.
Between 2012 and 2013, more than 26.7 million people 18 and older moved — 17.3 million of them to a different county. Those in their 20s and 30s with a college degree were most likely to move for job reasons and to move the farthest. In that period, people poured out of declining cities such as Detroit and into economic hot spots such as San Antonio.
The trend of more-educated people moving and less-educated staying began to emerge several years ago. The Census Bureau found that more than half of highly educated workers who moved between 2005 and 2010 left their counties, but 70 percent of people without high school diplomas who moved did so within the same county.
Decades ago, unskilled workers were able to migrate to better conditions elsewhere. But good blue-collar jobs are now harder to find anywhere.
‘‘If we pushed someone who’s stayed in Detroit to suddenly hit the road and move to Chicago, would that person suddenly do better? Or has that person stayed behind exactly because he or she can’t find a good-paying job in Chicago?’’ said Danny Yagan, a University of California economist.
For Stephanie Shinn Gaydos, a 2004 high school graduate from Danville who practices medicine in Charleston, Danville isn’t an option.
‘‘That’s a shame, because I’m close to my family,’’ she said.