After the Miracle For a generation, Americans have been outsourcing work to India, where companies like Infosys grew bigger than Facebook and Google combined and created a new middle class. It seemed as though the boom would last forever.

On March 15, a new ad campaign appeared on the trains and platforms of San Francisco’s BART system. “U.S. TECH WORKERS!” the ads exhorted in stark block letters beneath an image of a laptop screen displaying a raised fist. “Your companies think you are EXPENSIVE, UNDESERVING & EXPENDABLE. Congress, fix H-1B law so companies must Seek & Hire U.S. Workers!” There were 350 posters in all, bought for $80,000 by an organization called Progressives for Immigration Reform. Some commuters complained that the ads were hostile to immigrants. A BART spokesperson said the ads “contradict our values,” but that it had no choice but to run them.

The actual target of the ads went unnamed but was easy to discern: Indian information technology outsourcing companies. Each year, the U.S. government makes available 85,000 H-1B visas, which grant renewable three-year entry for skilled workers, and Indian tech companies have typically been awarded more than two-thirds of them. It’s a small fraction of the 4 million Indians who work in the IT services industry — but a crucial one. And one company, often applying for twice as many visas as its closest competitor, dominates the H-1B process: a Bangalore-based firm called Infosys. Founded in 1981, Infosys has a deep, although usually imperceptible, presence in America. Sixty percent of Infosys’s $10 billion in annual revenue comes from the United States. Infosys operates an IT center for Harley-Davidson in Milwaukee. It built an employee-communication system for Kellogg’s in Battle Creek, Michigan, and the Obamacare exchange for the District of Columbia. For the Minnesota-based school-picture company Lifetouch, which photographs more than half of all American students, Infosys designed and runs a system for scheduling senior portraits. The names of many other Infosys clients are held in confidence — because the company handles so much proprietary information and because clients don’t always want to reveal how much they benefit from Indian labor. Although Bank of America and Apple are not named as clients in Infosys’s annual report, they are reportedly the company’s two largest contracts. Suffice it to say that if you have money in a major bank, or use an iPhone, or buy things online, you’ve almost certainly used software that Infosys designs or maintains. In the company’s early years, Infosys engineers worked as mostly invisible digital construction workers and custodians, writing and testing software code for corporations that didn’t want to do it themselves. Today, its 200,000 employees do almost anything that falls under the ever-expanding umbrella of technology services, but it specializes in bespoke software, customized or built from scratch for the particular demands of specific clients, which is why it needs so many H-1B visas. If, for instance, Infosys is designing software to help a clothing retailer manage its inventory (which it has done for companies from Reebok to Nordstrom), part of the tech team needs to embed itself with the retailer to study its operations and discover precisely what software it requires. More than any other company, Infosys is responsible for lending India its current stereotype as a nation of computer whizzes. It helped transform, for better or worse, the leafy, laid-back city of Bangalore into a gridlocked megalopolis. The company’s founder, Narayana Murthy, and his wife, the author and philanthropist Sudha Murty, are India’s Bill and Melinda Gates. “Infosys created the Indian middle class,” Kris Lakshmikanth, the founder of a Bangalore-based executive search firm, told me. The IT industry it shaped now accounts for 9.3 percent of India’s GDP. But in the past year, Infosys and its competitors entered an unprecedented era of anxiety. “The market is in flux — there’s a lot of noise and confusion,” said Phil Fersht, the founder of HfS Research, the leading analysis firm of the IT services industry. “The level of offshoring of IT services has taken a massive dip since Trump got in.” Among workers, a panic over possible mass layoffs swept through Indian IT in response to American protectionism, the increasing adoption of powerful new technologies designed to replace humans, and incessant rumors in the press. Complaining of “widespread abuse,” Trump has made it much harder to obtain H-1B visas. With bewildering speed, technologies such as artificial intelligence, cloud computing, and new forms of automation are transforming almost everything the Indian IT services industry does. The consulting firm McKinsey estimates that new tech could make two-thirds of the Indian IT workforce “irrelevant” by 2020. Indian newspaper headlines warned of an IT jobs “bloodbath,” and while it didn’t quite arrive in 2017, there’s a sense that the inevitable layoff crisis has simply been postponed. Though Infosys ended the year with a slight increase in employees, four other leading Indian tech firms reduced their net head counts for the first time in their histories. “For the Indian IT sector, you gotta remember, the thing’s been growing for, like, the last 20 years,” said Ray Wang, founder of the IT analysis firm Constellation Research. “So anything short of growth looks like a layoff.” In the Indian IT industry, Infosys has long set the standard. Now it seems as uncertain as anyone about what comes next. “They are going through a critical phase in their history,” Fersht said. “They absolutely have to get it right.”

Infosys’s global headquarters lies at the heart of a suburb named Electronic City, just to the south of Bangalore. Its campus is much like the corporate oases of Silicon Valley: golf-ready lawns, an immeasurable menu of employee amenities, everyone on bicycles. The architecture is playful: One building mimics the Louvre Pyramid, another the Sydney Opera House, and the biggest structure on campus looks like a front-loading washing machine, according to its waggish young staff. But campus access is strictly limited by paramilitary barricade. Infosys is considered such an important strategic asset that in 2009 it became the first private company to be assigned protection by India’s Central Industrial Security Force, which had been formed to guard such sensitive government facilities as dams and currency mints and atomic power plants. Inside the “Washing Machine,” an elite army of Indian engineers works around the clock to keep the invisible infrastructure of Western corporations running. None of this was imaginable when Narayana Murthy founded Infosys along with six younger colleagues in 1981. The founders were all broke, so it fell to Murthy’s wife to put up the initial capital: 10,000 rupees, or approximately $1,200, which she’d earned as an accomplished computer engineer in her own right. Due to India’s highly restrictive trade policies, it was two years before they were able to obtain their first computer, forcing them to borrow machines from their clients. Banks didn’t understand what software was, and all refused them a loan. (They’d understand soon enough: Today, most Indian banks use Finacle, a software package Infosys designed to automate bank transactions — including loan approval.) It took them a full year to get a single phone line. “The joke used to be that half the people in India are waiting for a telephone connection, and the other half are waiting for a dial tone,” Murthy told me the first time I met him, at the office of Catamaran Ventures, the investment firm where he’s focused his energies since retiring from Infosys in 2014. Now 71, Murthy wore black rubber sandals and spoke with the slow, soothing enunciation of a kindergarten teacher. The personality trait that most pegs him as an industry titan is his love of inventing and repeating his own business aphorisms (which have been collected in a book called The Wit and Wisdom of Narayana Murthy): “Let the bad news take the elevator; let the good news take the stairs.” “In God we trust; everyone else brings data.” But he’s disarmingly self-effacing (“Sorry, I have another adage”) as he dishes them out. He’s so unassuming I had to keep reminding myself he was the wealthiest man I’d ever met — worth more than $2 billion. His son, Rohan, told me that for decades, until he injured his knee in 2010, Murthy demonstrated his egalitarian and self-sufficient principles by regularly cleaning his own toilet. From the outset, Murthy’s vision for Infosys was the system of globalized business that we now take for granted: selling wherever the market is, hiring wherever talent is cheapest and most abundant, and taking advantage of big time zone differences. He called it the “global delivery model.” IT industry analysts called it “your mess for less”: delegating unattractive tech tasks to offshore engineers at a deep discount. The savings were extraordinary. “The biggest strength of India is the ability of people to take the pain,” the former Infosys CFO V. Balakrishnan told me. Another former CFO, Mohandas Pai, echoed the sentiment: “We’ll work 18-hour days for months and years and bill eight hours.” Radhi Spear, the first female engineer Infosys hired, showed me her pay stubs from 1984: 1,500 rupees a month, or around $125. “It was considered really good pay,” she said. That same year, an entry-level American software engineer made 13 times as much. But it wasn’t easy to snag American clients at a time when Indians didn’t yet have a reputation for IT savvy. One of Infosys’s junior founders, S.D. Shibulal, told me that his first sales pitch, to a computer company in Massachusetts, was a disaster. For his second, he went prepared: “The first slide I had was a world map, and I said, ‘This is the world map. This is Asia. This is India. This is Bangalore. I am from there, and I speak English.’ ” Infosys established an image of impeccable rectitude, proving for the first time that an Indian company could succeed while refusing bribery and embracing financial transparency. They rejected nepotism at a time when every big Indian company was a family concern, including Wipro and TCS, Infosys’s two main competitors. TCS, which remains the largest outsourcing company in the world, is just one branch of the sprawling Tata Group, India’s biggest family conglomerate, which built its fortune in part by selling opium in China in the late-19th century and which now sells tea and trucks and steel and salt and electricity, among many other things. Wipro, another dynasty, began as an abbreviation for Western Indian Vegetable Products and specialized in cooking oil before making the unlikely shift to computer hardware. First TCS, then Wipro, then Infosys started selling a similar set of custom software services to companies abroad, and together, in the ’80s and ’90s, the three companies slowly built the field. At the end of the ’80s, however, Infosys was still struggling enough that the founders nearly decided to sell the company. Rescue came in 1991: After 44 years of quasi-socialist protectionism, the Indian government decided to radically liberalize its economy. The era of high tariffs, extreme import controls, and other tight restrictions on trade was over. The new freedom to buy equipment made possible the widespread offshoring of both manufacturing work and brain labor to India for the first time. In 1993, the founders went public on the Indian Stock Exchange, and Indian middle-class strivers could see themselves in a group of businessmen going big. Soon they started offering stock options to all employees, from executives to janitors, creating among some of them a new category of Indian worker: the salaried millionaire. In 1999, Infosys became the first Indian company ever to list on Nasdaq. Over the next ten years, the company’s revenue grew an average of more than 50 percent per year, thanks in part to the ultimate “your mess for less” job. The Y2K bug — the shortcoming in countless software date codes that threatened to turn the changeover from 1999 to 2000 into a global systems crisis — was tedious to fix, and Western companies turned overwhelmingly to Indian IT companies. This boost in business gave Infosys a new set of clients and connections that launched it into the 21st century. Indian IT companies proliferated in the wake of Infosys’s success, cementing India’s role as the primary global provider of back-end tech labor. The Indian IT boom overlapped with the American dot-com bust: In 2001 and 2002, the U.S. lost more than half a million tech jobs. Over those same two years, Infosys’s workforce nearly doubled. In the United States, angry programmers protested job losses with picket signs reading Will Code for Food. Later, some American tech workers alleged that Infosys was abusing the U.S. visa system, and one such charge, levied by an American Infosys worker turned whistleblower, led to a formal government complaint that Infosys had fraudulently brought some workers over on the wrong type of visa. The company denied wrongdoing, but in November 2013, it agreed to settle for $34 million — the largest settlement ever paid for a U.S. immigration case. In India, the IT hiring spree revolutionized the culture in ways Murthy never could have anticipated. Vasudhendra, a prominent writer and cultural critic who worked for 20 years in IT, including for Infosys rival TCS, said that the industry offered, for the first time in India, a workplace that resembled a meritocracy, where no one asked about caste, where even bosses went by first names, and where men and women were considered equally capable. (Women make up 36 percent of Infosys’s current employees — 10 percentage points more than at Microsoft and in a country where women account for only 16.2 percent of formal urban workers.) The pay was liberating — and to his father, shocking. Vasudhendra’s father had taken what used to be the primary route to the middle class: a government job. After 40 years in the revenue department, his final paycheck was for 2,000 rupees. Vasudhendra’s first paycheck was for four times as much. “It created a major gap in society,” Vasudhendra told me. “And people started to some extent hating the people who worked in IT.” In every Indian city that developed a major IT presence, real estate boomed, and the prices of goods rose wildly. The tech industry fueled an American-style consumerism. “When the money came in, you started buying everything. Whatever you want,” Vasudhendra said. “You buy a house, and you’re not happy with the house — go for another house.” No industry has transformed modern India more than IT — and no Indian city has been more transformed by IT than Bangalore. A generation ago, Bangalore was known as a “pensioner’s paradise,” the ideal place to retire given its easygoing culture, its abundance of gardens and lakes and bookshops, and its manageable size. Since 1981, the year Infosys launched, its population has nearly quadrupled: from less than 3 million to more than 11 million. Most of its lakes have disappeared, many of them paved over for apartment complexes and sports clubs. Its traffic is unspeakable. It’s now a playground for the young, defined by its cafés, microbreweries, and nightlife. Most significantly, IT gave Indians access to the rest of the world. “If someone went to the U.S., U.K., or any foreign country, it was considered a big achievement in my childhood days,” Vasudhendra said. “But once IT entered, everyone started getting an opportunity to go abroad” — to install a software project, to attend a training program. When Narayana Murthy retired in 2014, he still lived in the same modest house he bought long before the company got big. That year, with Murthy’s blessing, Infosys hired its first-ever nonfounder CEO: Vishal Sikka, a tech savant who’d written his Stanford dissertation on artificial intelligence, studying under John McCarthy, the man who’d coined the term. Helping companies adapt to new technology has always been at the heart of what Infosys does, but now the options were multiplying so fast that Indian IT services companies were often left looking as though they were chasing buzzwords. Sikka was a genuine enthusiast for all the new tech. But he was blunt in his assessment that India’s dominance of IT services was no longer secure. A year into his tenure, the tech journalist Saritha Rai asked him, “Is this the end of India’s ‘IT miracle’ as we know it?” “It is dead,” Sikka said. “It is over.”

In the early months of 2017, a steady flow of alarming headlines in the Indian press warned of an impending crisis for IT workers: “Cheap Indian Engineers Now Have No Place in Donald Trump’s America,” “Automation: Why Being a Techie in India Is No Longer Cool,” “Job Loss Fears Leave Techies Reeling Under Uncertainty,” “India’s $150 Billion IT Industry Has a New Mantra: Reskill or Perish.”

In April of last year, Puneet Manuja, the co-founder of YourDost, a Bangalore-based online mental-health platform that offers counseling via live chat, noticed a spike in messages from IT workers who’d lost their jobs, or worried they would soon. In response, YourDost opened a temporary hotline to field employment concerns. Over three days, they were contacted by 1,100 workers. “A lot of these people did not have a plan B,” Manuja said. “More than 60 percent of people who reached out to us had less than three months of savings left.” Many who’d lost jobs, he said, were hiding it from their parents and friends. “When we asked why people do not tell their parents, they said you are considered weak. If you’ve been fired or laid off, it’s very difficult to convince people that it’s because of some structural changes.” They heard from one young woman, he said, who lived with her parents and who, for a week or two after getting fired from her IT job, got dressed and left every day as if she were going to work. The leading IT companies all denied that they were laying off anyone. Some IT workers told me that, to avoid admitting to layoffs, the companies had increasingly been setting impossible performance targets to push out workers. One evening I met a longtime Infosys employee in his apartment in east Bangalore. The courtyard of his housing complex was a dazzling display of lights and fountains and overwhelming scale; it was the kind of residence that would have been unimaginable in the old Bangalore, before IT took over. Early last year, he said, he took two months’ leave following the death of his father, and when he returned he felt he’d come back to a different company. His new manager, he said, removed him from his projects, gave him a poor performance review, and incessantly pressured him to resign, threatening him with termination if he didn’t. After two months of this, he surrendered. He still seemed stunned and mortified by this turn of events; he said his work had always been highly commended by managers and clients alike and showed me emails to prove it. He didn’t want me to name him because he still hoped the company would take him back. On an unusually scorching Satur­day in July, 60 or so mostly middle-aged IT workers from a variety of firms gathered in a shadeless corner of Bangalore’s Freedom Park for a protest organized by the newly minted IT Employees Union. The convener of the protest, an IBM employee named Kumara Swamy, said that this was the first-ever demonstration against layoffs in Indian IT history. The mood was anxious. At the edge of the gathering, 20 uniformed police officers stood by with long sticks in case of trouble. “There is no job security in IT!” Swamy shouted into an unnecessary microphone. “If you lay off, pay off!” “More than a thousand people had promised to come, but they’re afraid,” a worker named Rakesh Srivatsa told me. A small group crowded around me to air their complaints, but most declined to give their names, fearful of landing on a rumored industry-wide blacklist. It’s these middle-aged workers who are most vulnerable. “A 55-year-old gets paid three times what a 25-year-old gets paid, and maybe his productivity is less,” the former Infosys CFO, Mohandas Pai, had told me. The huge wave of young new hires from the IT boom in the ’90s and early 2000s are now hitting middle age. Above all, the protesters said, their intended audience was the Indian government: They envied what they viewed as America’s generous safety net, especially Social Security and unemployment insurance benefits. They all praised Murthy but said that when it comes to job security, Infosys had become just like any other IT company since he retired. Two current middle-aged Infosys managers pulled me aside to talk, eyeing eavesdroppers with suspicion. “When I joined, they considered employees as stakeholders,” one said of Infosys. “Now they don’t. The market scenario is automation.” A month earlier, in its 2017 annual report, Infosys touted that automation had helped it “eliminate 11,000 full-time employees worth of effort” — igniting fears that the company was admitting to 11,000 layoffs. Executives were quick to insist that no one had been laid off — that automation had simply allowed the company to “repurpose” the equivalent amount of labor hours “into more valuable and rewarding tasks” and that automation was helping to “amplify the potential” of its employees. This isn’t just whitewashing; one of the main purposes of IT services is to automate tasks. But the IT services industry may be, as HfS Research put it in a recent publication, “just kicking the can of job elimination down the road.” By 2022, HfS predicts that automation will cause overall Indian IT services jobs to drop by 7.5 percent. Hardest hit will be “low-skill” positions, especially software testing, a category that accounts for the majority of what Indians in IT do; those, they estimate, will drop by 31 percent, or around 750,000 workers. This may be merely the prelude to worse job losses to come. “The next five years we can manage,” the report’s authors wrote. “It’s the five after that when the impact on labor becomes much more challenging.” The problem is compounded by the fact that more and more young Indians are expecting to enter the field, their hopes stoked by long years of robust growth. Indian undergraduates studying computer engineering nearly tripled between 2011 and 2017. Those students are increasingly funding their educations through loans, but even before last year’s hiring slowdown, only 40 percent of them were able to find jobs in the field. Many of the new engineering schools that have mushroomed over the past decade offer an abysmal standard of education, qualifying their graduates for nothing better than the low-skill jobs that are now disappearing. And then there’s the Trump effect. His hostility toward outsourcing was perhaps most vividly illustrated during a campaign speech in Delaware when he offered a brief mocking impression of an Indian call center worker. In April of last year, he signed the “Buy American and Hire American” executive order, which specifically targets H-1B visas, and his administration has subsequently made it harder for Indian companies to obtain them at every stage: “Requests for evidence” have doubled in response to H-1B applications, denials are at record highs, and automatic visa renewals have been abolished. By summer, it is expected that the Trump administration will terminate more than 100,000 temporary work permits that the Obama administration had granted to the spouses of H-1B visa holders — a preponderance of whom are college-educated Indian women. Most likely in response, H-1B applications have dropped by nearly 20 percent since 2016. But even as they fear what Trump means for their industry, some Indian tech workers can’t help but envy his single-minded parochialism. “We want a politician like that,” one Infosys engineer told me. “We want our jobs to be preserved.”