Prime Minister Justin Trudeau is defending legislation that would prevent people from "asylum shopping" in Canada, barring them from making such a claim if they previously applied for asylum in other safe countries, including the United States.

The proposal was included in a budget bill introduced this week in Parliament. The government is earmarking 1.18 billion Canadian dollars ($880 million) in spending over the next five years to reinforce border security and speed up processing of asylum claims.

Trudeau said Canada has been seeing larger numbers of refugee claims because of global instability. Sustaining Canadians' confidence in the country's asylum system means ensuring those who enter Canada do so according to the law, he said.

"That's why we're putting more resources in, and we're also ensuring the system is fair for everyone," Trudeau told reporters Wednesday.

Authorities say that since early 2017, more than 41,000 asylum-seekers have "irregularly" crossed into Canada, meaning they arrived without going through an official port of entry. By doing so, they take advantage of a loophole in Canada's Safe Third Country Agreement with the U.S. that allows people who cross irregularly to make refugee claims. Asylum-seekers trying to enter at official border crossings are turned back to the U.S. — a country Canada considers safe for them.

The influx of irregular migrants to Canada began after U.S. President Donald Trump announced he would end a program that offers temporary protected status to people from several countries, serving notice he would seek to return them to homelands that the United States had previously considered too dangerous. The U.S. also eliminated domestic and gang violence as possible grounds for asylum.

Refugee advocates, lawyers and opposition parties have questioned the asylum proposal, saying that disallowing asylum-seekers in Canada who have made prior refugee claims in other countries could see them sent back to dangerous situations.

Members of Parliament have asked to divide the non-budgetary measures from the budget bill so the asylum proposal can be voted on separately.