Are you ready to bring more awareness to your brand? Consider becoming a sponsor for The AI Impact Tour. Learn more about the opportunities here.

The Indian outsourcing industry is being hit hard as markets stagnate and U.S. visa restrictions erode profits. “Carnage in Indian IT,” one headline called it.

India’s IT industry generated almost $150 billion in revenue last year but is facing an existential crisis largely of its own making because it became complacent and overconfident even as technologies and markets changed. It can survive only if it exits the business that has brought it success and reinvents itself.

India’s outsourcing boomed during the Y2K crisis of the late ’90s because there was an urgency in repairing corporate information technology systems. Once chief information officers (CIOs) became comfortable with having their systems maintained across the globe, they started outsourcing large-scale projects to Indian companies, and billion-dollar contracts were announced almost every week.

But with the advent of tablets and smartphones and their applications in the 2010s, users gained access to better technology than the companies’ IT departments could provide. They could download cheap, elegant, and powerful apps on their tablets that made their corporate systems look primitive. Via cloud computing, companies such as, Microsoft, and Google began to take over the functions of data centers. So CIOs lost power, and the importance of outsourcers declined. The billion-dollar outsourcing contracts evaporated.

Modern-day applications also don’t require large teams of engineers doing software development: They are user-customizable and can be built by anyone with basic programming skills. To offer more value, the outsourcers worked to reduce costs by improving back-end processes. They offered low-cost offshore development and cheap labor in the United States, and this fomented a backlash by displaced workers.

But the same technology advances that decimated the Indian advantage offer a new opportunity that could allow the Indian IT sector to reinvent itself and even gain the support of Americans who have been rallying against it. Specifically, it can help America modernize its aging infrastructure and enable it to bring manufacturing back from China. Technologies such as robotics, artificial intelligence, and inexpensive and powerful sensors enable development of smart cities and automated factories and a wholesale upgrading of national infrastructure.

China is taking the lead in building zero-labor manufacturing plants, with robots doing practically all of the work. But its robots have no advantage over American robots; all of them work equally hard and consume nothing more than energy. Manufacturing can now return to American shores without raising costs.

There is, however, an obstacle: American businesses aren’t geared up to take advantage of manufacturing robots because they simply don’t have the know-how. This is where India’s outsourcers could help. They could master the new technologies and help American firms design new factory floors and program and install robots. They could provide management consulting in optimizing supply chains and inventory management. And they could manage manufacturing-plant operations remotely. This is a higher-margin business than the old IT services. And Americans would cheer India for bringing manufacturing back to their shores rather than protest its taking their IT jobs away.

No, there won’t be as many jobs in each manufacturing plant as there were before. But many new high-paying jobs would be created to build factories and manage them.

It is also possible to build smart cities, with sensors monitoring every aspect of a city’s functioning, including parking, traffic congestion, lighting, waste management, pollution, and water leaks. The installation and design of these require managerial and analytical skills; their monitoring functions are no different from those of managing data centers.

And then there are opportunities to create applications that can revolutionize fields such as health care and education and to build technologies for the underprivileged — something that Silicon Valley’s entrepreneurs don’t focus on because they don’t understand the dire needs. These are all things that Indian IT companies can do.

It is not that Indian companies don’t realize the threat. Tech Mahindra’s chief executive, C.P. Gurnani, told my class at Carnegie Mellon’s College of Engineering in Silicon Valley on May 1 that he was working hard to change the focus of his company from services to technology products and to solve problems outside IT. He talked about the rapidly changing markets and urgent need for his company to build offerings in areas such as health care, manufacturing, retail, and managed services.

Will India’s IT sector finally wake up and smell the opportunity? It remains to be seen. One thing is sure: The backlash will build if it does not — and the Indian information technology sector will accelerate its decline into oblivion.

Vivek Wadhwa is Distinguished Fellow at Carnegie Mellon University Engineering at Silicon Valley.

VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Discover our Briefings.