But not for Sachindeep Singh on the evening of Sept. 19.

A few miles into the ride, his Uber app stopped working.

Singh’s work permit had expired at midnight, and, like Canada, Uber was putting him on notice.

Singh, 23, arrived in Canada as an international student in 2019. His immigration status permitted him to work and offered a path to permanent residence, an approach labeled “study-work-stay” on the Canadian government’s immigration website.

But after inviting millions of newcomers to Canada in recent years to help lift the economy, the government has reversed course amid growing concerns that immigrants are contributing to the country’s deepening challenges around housing, health care and other issues.

A series of measures unveiled this year, focused on Canada’s vast temporary residence program, has imposed barriers that have left hundreds of thousands of migrants like Singh in legal limbo.

The international student program that Singh followed has made one route to the Canadian dream of permanent residency, through education, appealing for hundreds of thousands of young people — many of them from India.

International students, who after graduating are eligible for work permits to continue living legally in Canada, represent one major category of temporary residents. Another group is made up of workers who come at the invitation of specific employers, while the smallest cohort are migrants seeking asylum.

The temporary residence program was ramped up after the coronavirus pandemic, as Canada’s economy struggled to fill a labor shortage.

As a result, nearly 3 million people living in Canada have some type of temporary immigration status, with 2.2 million arriving in just the past two years, according to government statistics. Temporary residents represent 6.8% of the country’s total population of 41.3 million, up from 3.5% in 2022.

But Canada’s economy is now creating fewer jobs, and unemployment, at over 6%, remains stubbornly high. It is even higher for temporary residents, at 14%.

Many Canadian cities face a housing affordability crisis, and several provinces have overstretched health care systems.

Critics say the large number of temporary residents make these problems worse, and the public mood toward immigrants has soured.

In response, Marc Miller, the country’s immigration minister, has announced a series of cuts to immigration quotas since the start of this year, including lowering the number of student visas issued and capping the number of temporary foreign workers that a company can employ.

As part of the government’s efforts to rein in the temporary residence program, expiring or expired work permits for many immigrants — like Singh — may not be renewed.

“Immigration, writ large, has been, in part, responsible for preventing us from going into a recession,” Miller told the news media last month. “But I think it’s safe to admit that we have allowed certain aspects of this to get overheated, and probably for too long.”

Miller did not respond to a request for comment. The government is expected to impose further restrictions next month.

With 1 in 5 Canadians born overseas, the country has long been open to immigrants. Conservative and Liberal governments have historically promoted immigration policies meant to bolster the ranks of workers and increase the population.

But that is now shifting. Most Canadians, polls show, believe the country has taken in too many newcomers in too short a period. An August poll, for example, showed that two-thirds of Canadians feel the current immigration policy is letting too many people in.

Many immigrants, however, argue they are unfairly being targeted, saying they were invited to Canada only to face the prospect of having to leave if their work permits are not renewed.

The debate over Canada’s immigration policy has echoes of far more polarized arguments in the United States and Europe.

In the United States, limiting illegal immigration is a major issue in next month’s presidential election, with former President Donald Trump promising mass deportations and Vice President Kamala Harris presenting a tougher line than in her party’s past positions. In Europe, the topic has recast politics over the last decade, fueling a rise in anti-immigrant and, in some cases, openly racist political parties.

Still, the overwhelming majority of Canada’s immigrants arrived legally, and despite the recent change of sentiment, political discourse remains broadly civil.

Some experts argue that stresses on the housing market or health care reflect chronic underinvestment by the government, rather than the consequences of high immigration rates.

Still, the tension between the influx of immigrants and the economic problems can be seen playing out in places like Brampton, a city near Toronto where many Indian students and temporary workers have settled.

Gurpartap Singh Toor, a local councilor for Brampton and the broader region of Peel, arrived in Canada in 2011 as a migrant. He said the large numbers of newcomers had stretched resources.

The health infrastructure in Brampton — one hospital and a smaller medical center — is insufficient for the population of around 700,000, Toor said.

Housing availability and costs, he said, have been worsening, partly because unscrupulous landlords rent out small properties to multiple students, charging them hundreds of dollars each and pricing out local families.

The Bank of Canada, the country’s Fed, has said that in parts of Canada popular with temporary residents, there is less rental housing, and it is more expensive than in regions with a small number of such residents.

But the bank has blamed onerous government regulations, as well as a lack of construction labor, for the low availability of housing.

Study, work, limbo

Canada says it will take a more flexible approach to immigration, allowing people in when they are needed and closing the door when they’re not.

“I’ve said it before, and I’m going to state it again: The temporary foreign worker program is an accordion,” the employment minister, Randy Boissonnault, said at a recent news conference.

“It’s meant to flex with the economy,” he added. “When we have a high number of vacancies, we can bring in more people, and as the economy tightens, we close the accordion, and we make it harder for people to come in.”

Singh, like others whose work permits have expired, faces dwindling options.

Singh and his family in India spent 40,000 Canadian dollars ($30,000) on office management and hospitality degrees at a Canadian college, believing it would secure him a stable footing in his adopted country.

Instead, he is now struggling to come up with other options.

He could go back to a Canadian college and pay the higher tuition fees for international students in exchange for being allowed to work and keep seeking permanent residency.

Or he could apply for a visitor’s visa, though it would not give him the legal right to work. He could go back to India, his least appealing possibility, given the years and the money he has invested in Canada.

The limbo facing many temporary residents whose permits have expired, or soon will, is pushing some into harmful or illegal paths, said Gurpreet Malhotra, the CEO at Indus Community Services, a government-funded group helping migrants.

Some, he said, end up staying illegally and working as cleaners, in warehouses or restaurant kitchens, for a fraction of the minimum wage. A desperate need for money also makes them vulnerable to being recruited by criminal groups, he said.

Some also file asylum claims even if they do not meet the criteria because it buys them time to stay, he added. Some 13,000 international students made asylum requests in the first eight months of this year, according to government data, more than double the figure for all of last year.

Some also decide to head to the United States, where illegal crossings from Canada at the northern U.S. border have surged to record levels.

In Brampton, Singh and dozens of international students mostly from India have organized a permanent encampment near the city’s busiest highway. Every day, they gather to commiserate, exchange information about the policy changes and stage protests.

They hold up signs that say, “Good Enough to Work? Good Enough to Stay.”

Toor, the local councilor, said the Canadian government’s rapid policy shift after years of dependence on temporary residents went too far.

“When you start cutting back on it so aggressively,” he said, “there’s a sense of betrayal.”