Artificial intelligence may one day make some of life’s most stubborn headaches cheap to fix. The catch is that humanity has to white-knuckle its way through a 20-year shake-up first, a bit like being promised a dream vacation after the world’s longest layover.

Microsoft co-founder Bill Gates said even the best-case scenario for AI comes with a stretch of disruption unlike anything society has seen before.

“My big concern is this 20-year transition period where they’ll have winners and losers and a lot of disruption, and we have to get through that in order to get to that period of abundance,” Gates said on the Oct. 22 “Decoder” podcast episode.

Gates isn’t selling doomsday. He thinks AI could help cure diseases, improve classrooms, and make scarce things less scarce.

His worry is that society is treating the risks like a distant rumor while they’re already buckling in right next to the benefits.

Read more: Warren Buffett bought this company in 1988 when ‘no one’ wanted it — now it pays Berkshire $848 million a year

The AI transformation countdown has already started

In an essay published in August, titled “The Turbulent AI Era Is Here. The Choices We Make Now Are Critical,” Gates described AI as a technology that could either spread opportunity or deepen inequality.

“AI will either be the greatest equalizer ever invented, or the worst source of injustice,” Gates wrote.

He argued that the good and the bad are showing up at the same time, leaving governments and communities little room to adjust at a leisurely pace. Earlier technological shifts unfolded over generations. AI could rework entire industries within a decade.

Gates also warned that the people who need the most time to prepare may get the least of it, particularly workers whose jobs are most exposed to automation.

Microsoft co-founder Bill Gates has warned that AI could transform society faster than people are prepared for.

Tom Brenner / Getty Images

AI dangers go well beyond paychecks

Gates has also raised concerns about AI helping bad actors carry out devastating attacks. In a September interview with NBC’s “Meet the Press,” he warned that the technology could enable catastrophes on an unprecedented scale.

“AI is certainly powerful enough to drive events that, you know, cause a billion deaths,” Gates told host Kristen Welker.

More Microsoft:

He also pushed for government involvement, arguing that tech companies can’t manage the risks with voluntary safeguards alone.

The warning adds weight to his 20-year forecast. The challenge isn’t only helping people adapt to a changing economy. It’s also keeping powerful tools out of the wrong hands while making sure the benefits actually reach the public.

A pep talk for the next generation

If AI is about to touch nearly every field, young people entering the workforce face an awkward question. When machines can handle more of the work, what makes a human worth hiring?

Gates acknowledged that the technology can feel intimidating to people hoping to build careers and do meaningful work. But he offered a more upbeat take during the “Decoder” interview.

“If you’re in your 20s today, during this 20-year period, you can take the things AI still can’t do and you can use AI and you can have a lot of good impact, and you can suggest policies,” Gates said.

He also suggested society may eventually choose to keep certain activities human-led, even when AI could do them faster.

In Gates’ view, the next two decades won’t be defined solely by how powerful AI gets. They’ll be defined by the choices people make on the way there.

Related: Read more: