Visitors to the McDonald’s wooded corporate campus enter on a driveway named for the late chief executive Ray Kroc, then turn onto Ronald Lane before reaching Hamburger University, where more than 80,000 people have been trained as fast-food managers.

Surrounded by quiet neighborhoods and easy highway connections, this 86-acre suburban compound adorned with walking paths and duck ponds was for four decades considered the ideal place to attract top executives as the company rose to global dominance.

Now its leafy environs are considered a liability. Locked in a battle with companies of all stripes to woo top tech workers and young professionals, McDonald’s executives announced last year that they were putting the property up for sale and moving to the West Loop of Chicago where “L” trains arrive every few minutes and construction cranes dot the skyline.

In Chicago, McDonald’s will join a slew of other companies — among them food conglomerate Kraft ­Heinz, commodities giant ADM and telecommunications firm Motorola Solutions — all looking to appeal to and be near young professionals versed in the world of e-commerce, software analytics, digital engineering, marketing and finance.

Such relocations are happening across the country as economic opportunities shift to a handful of top cities and jobs become harder to find in some suburbs and smaller cities.

(Lee Powell/The Washington Post)

Aetna recently announced that it will relocate from Hartford, Conn., to Manhattan; General Electric is leaving Connecticut to build a global headquarters in Boston; and Marriott International is moving from an emptying Maryland office park into the center of Bethesda.

Chicago Mayor Rahm Emanuel (D) said the old model where executives chose locations near where they wanted to live has been upturned by the growing influence of technology in nearly every industry. Years ago, IT operations were an afterthought. Now, people with such expertise are driving top-

level corporate decisions, and many of them prefer urban locales.

“It used to be the IT division was in a back office somewhere,” Emanuel said. “The IT division and software, computer and data mining, et cetera, is now next to the CEO. Otherwise, that company is gone.”

The migration to urban centers threatens the prosperity outlying suburbs have long enjoyed, bringing a dose of pain felt by rural communities and exacerbating stark gaps in earnings and wealth that Donald Trump capitalized on in winning the presidency.

McDonald’s may not even be the most noteworthy corporate mover in Illinois. Machinery giant Caterpillar said this year that it was moving its headquarters from Peoria to Deerfield, which is closer to Chicago. It said it would keep about 12,000 manufacturing, engineering and research jobs in its original home town. But top-

paying office jobs — the type that Caterpillar’s higher-ups enjoy — are being lost, and the company is canceling plans for a 3,200-person headquarters aimed at revitalizing Peoria’s downtown.

“It was really hard. I mean, you know that $800 million headquarters translated into hundreds and hundreds of good construction jobs over a number of years,” Peoria Mayor Jim Ardis (R) said.

Long term, the corporate moves threaten an orbit of smaller enterprises that fed on their proximity to the big companies, from restaurants and janitorial operations to subcontractors who located nearby.

Rennie Atterbury is a former Caterpillar executive. “The people who built this company from 1925 on were Peorians, they were Midwesterners, they weren’t city people,” he said. (Lee Powell/The Washington Post)

“The village of Oak Brook and McDonald’s sort of grew up together. So when the news came, it was a jolt from the blue — we were really not expecting it,” said Gopal G. Lalmalani, a cardiologist who also serves as the village president.

Lalmalani is no stranger to the desire of young professionals to live in cities: His adult daughters, a lawyer and an actress, live in Chicago. When McDonald’s arrived in Oak Brook, in 1971, many Americans were migrating in the opposite direction, away from the city.

In the years since, the tiny village’s identity became closely linked with the fast-food chain as McDonald’s forged a brand that spread across postwar suburbia one Happy Meal at a time.

“It was fun to be traveling and tell someone you’re from Oak Brook and have them say, ‘Well, I never heard of that,’ and then tell them, ‘Yes, you have. Look at the back of the ketchup package from McDonald’s,’ ” said former village president Karen Bushy. Her son held his wedding reception at the hotel on campus, sometimes called McLodge.

The village showed its gratitude — there is no property tax — and McDonald’s reciprocated with donations such as $100,000 annually for the Fourth of July fireworks display and with an outsize status for a town of fewer than 8,000 people.

McDonald’s, though, came under pressure to update its offerings for the Internet age, so it opened an office in San Francisco and a year later moved additional digital operations to downtown Chicago, strategically near tech incubators as well as digital outposts of companies that included Yelp and eBay.

Chief executive Steve Easterbrook, who took over in spring 2015, sought to keep innovating, launching mobile ordering, emphasizing self-serve kiosks in restaurants and expanding delivery through a partnership with UberEats.

As McDonald’s embraced technology, it decided that it needed to be closer not just to workers who build e-commerce tools but also to the customers who use them, said Robert Gibbs, the former White House press secretary who is a McDonald’s executive vice president. That is because the next generation of fast-food consumers may be more likely to arrive via iPhones than drive-throughs.

“The decision is really grounded in getting closer to our customers,” Gibbs said.

The site of the new headquarters, being built in place of the studio where Oprah Winfrey’s show was filmed, is in Fulton Market, a bustling neighborhood filled with new apartments and some of the city’s most highly rated new restaurants.

Bushy and others in Oak Brook wondered aloud if part of the reasoning for the relocation was to effectively get rid of the employees who have built lives around commuting to Oak Brook and may not follow the company downtown. Gibbs said that was not the intention.

“Our assumption is not that some amount [of our staff] will not come. Some may not. In some ways that’s probably some personal decision. I think we’ve got a workforce that’s actually quite excited with the move,” he said.

Chicago’s arrival as a magnet for corporations belies statistics that would normally give corporate movers pause. High homicide rates and concerns about the police department have eroded Emanuel’s popularity locally, but those issues seem confined to other parts of the city as young professionals crowd into the Loop, Chicago’s lively central business district.

Chicago has been ranked the No. 1 city in the United States for corporate investment for the past four years by Site Selection Magazine, a real estate trade publication.

Emanuel said crime is not something executives scouting new offices routinely express concerns about. Rather, he touts data points such as 140,000 — the number of new graduates local colleges produce every year.

“Corporations tell me the number one concern that they have — workforce,” he said.

To Peorians, Caterpillar’s change of heart came suddenly. Two years ago, the company’s leadership team joined state and local officials at a ceremony to announce plans for a new $800 million, 31-acre headquarters aimed at reviving a downtown pockmarked by vacant storefronts.

“We’re here in Peoria to stay,” Caterpillar’s then-chief executive Doug Oberhelman declared at the time. Illinois Gov. Bruce Rauner (R) stood to applaud.

Then, in January of this year, Caterpillar abruptly canceled the Peoria headquarters complex and said it would move about 300 top executives to the Chicago area.

The local reaction wasn’t just disappointment but bewilderment. Three generations of the city’s residents have worked at Caterpillar — designing, assembling and painting tractors and pipelayers.

Like other firms, Caterpillar had a digital hub in downtown Chicago, just over a mile from the new McDonald’s headquarters. But now it is also moving many of its top executives away from where colleagues are designing, producing and shipping the company’s products — and the possibility of more Caterpillar jobs leaving looms.

“There are definitely people in this region who don’t want to go to Chicago and are worried that their jobs are going there,” said Jennifer Daly, former chief executive of the Greater Peoria Economic Development Council.

If more jobs go, it will diminish the options for highly qualified managers and executives who have chosen to make their homes in Peoria — a far more affordable, less congested place than Chicago or Deerfield.

“The people who built this company from 1925 on were Peorians, they were Midwesterners, they weren’t city people,” said Rennie Atterbury, a longtime former Caterpillar executive and general counsel.

The decision has left Peoria officials scrambling. They are focusing on different industries, such as health care, and helping the city’s other manufacturing firms to find work beyond building tractors. About 100 small manufacturers in the area rely largely on Caterpillar contracting work.

“We really want to help them diversify,” Daly said. “These manufacturers are not used to having to pursue sales outside of the earth-moving industry.”

Lee Powell in Peoria contributed to this report.