We all know that companies, and even entire industries, risk losing out by failing to keep up with changing technology. But what’s less recognized is that cities face a similar danger that is tied, oddly enough, to how much time workers there spend thinking.

A recent study by Oxford University researchers found that the more time workers spend thinking, the more successful the city. The finding counters the idea that civic success is based on attracting particular industries.

Dr. Carl Benedikt Frey and researcher Thor Berger used census and Labor Department data to track the emergence of new occupations and the “cognitive intensity” of those jobs between 1970 and 2000. They found that cities that have become tech powerhouses, like San Francisco and Austin, were preordained to win because they were already among America’s top five “most cognitive” places as far back as 1970.

SIGN UP:Get Data Sheet, Fortune’s daily newsletter about the business of technology.

Their research covers a period of intense technological development that had a huge impact on work. Routine jobs like machine operation and data entry became increasingly automated, making those jobs more scarce, while the number of people in science, management, and law expanded.

Frey and Berger explain that this had divergent impacts on cities, in part because early adoption of technology in the most cognitive cities in turn created more demand for skilled labor there. That demand helped to create today’s nearly 15% gap in college education rates between the most and least educated U.S. cities. Starting in 1980, cities with more cognitive workers also experienced much faster population growth and more rapid wage growth.

The authors were careful to emphasize that certain cities are not smarter than others, just specialized in different occupations that require different levels of cognitive intensity.

In some cases, cities that had lost economically before computers arrived, ended up winning in the era of cognitive intensity. For the 1970s, the study found that the cities dominated by factory labor and repetitive work added the most new job tasks, or the individual steps required for a particular occupation. There was actually less innovation and slower wage growth in places where people spent more time reading books than turning bolts.

The findings help explain one of the more fascinating cultural realities of the tech industry. Before tech took over the world, places like Austin, San Francisco, and even New York were known as places for artists and fringe-dwellers to turn on, tune in, and drop out.

WATCH: For more on education and the economy:

Though they don’t indulge in much prognostication, the study’s authors conclude with a tip to those aiming to build the next San Francisco: “Policy makers would do well in promoting investments in transferable cognitive skills that are not particular to specific businesses or industries.”

In other words, dangling tax incentives to attract companies offers fewer long-term benefits than investing in education. And while state and national leaders are emphasizing scientific and technical education, Frey and Berger’s study seems to show the power of skills, like critical thinking and language skills, that fall under the umbrella of the liberal arts.

Who would have thought?