The casualties of automation are on the rise, but it’s not bad news for everyone.

Nearly one third (700,000) of low-skilled workers in India’s IT sector could lose their jobs by 2022 due to an uptick in the adoption of robotics and artificial intelligence. But those in medium- and high-skilled jobs stand to gain from the trend, a recent report (paywall) by market analysis firm HfS Research said.

In the next five years, the number of medium-skilled IT employees is estimated to rise to 1 million from 900,000 while the number of high-skilled employees will jump to over half a million from 320,000, according to the report.

With technological advancements, “the productivity of higher-skill workers, especially those engaged in abstract thinking, or with creative and problem-solving skills, has increased,” a January 2017 report by management consultancy McKinsey & Company explained. As a result, they’re more likely to be in demand in the coming years. Moreover, new job opportunities—such as supervising artificial intelligence or creating infrastructure for self-driving cars—are expected to arise as newer technologies are absorbed. But repetitive and less-skilled roles, like working warehouses and basic bookkeeping, aren’t going to see the same productivity gains and are, thus, depleting.

The trend in India reflects what HfS expects to happen across the world.

Globally, low-skilled jobs in the IT sector are seen falling by 31% by 2022, whereas medium-skilled jobs are estimated to increase by 13%, and high-skilled ones will jump 57%.

The net job loss from automation in India comes in at around 450,000, dropping the total IT job count over 12% from 3.65 million in 2016 to 3.2 million in 2022. The only country worse off than India is the US: The 4.88 million jobs that were available in the US tech sector last year are expected to shrink to 4.33 million in the next five years.