This post originally appeared at the Conversation.

President Donald Trump has pledged to deport several million undocumented immigrants and recently set a plan in motion targeting those with criminal records (of any kind). While the ethical issues with mass deportations have received lots of attention, the economics haven’t been explored as comprehensively. And the costs of mass deportations will likely be significant.

These include the impact on economic growth and the labor force, which have received some coverage. But there are several other factors that ought to be considered, such as the debts and dependents left behind by those deported and the costs of giving them the boot.

To start with, undocumented immigrants are able to amass debt in the U.S., and being deported makes it less likely they’ll honor it. This imposes risks on the financial system and on lenders in particular.

A person need not be a citizen or a permanent resident to obtain a mortgage, credit card, car loan, or student loan—something covered even at Trump University, it seems.

To get a mortgage, for example, an illegal immigrant need only show a history of paying taxes, have a down payment, and possibly have other documentation of income. Alterra Home Loans, for one, explicitly offers home loans to people with no Social Security card and no documents to prove legal status. According to a 2009 Pew Hispanic Center survey, about 35 percent of “unauthorized immigrant households” own homes.

It is not clear how many mortgages have been given to undocumented immigrants. If we assume 1 million of the 11 million estimated immigrants in the U.S. without papers currently have a mortgage of $50,000 (a third of the average of $172,806), this conservative estimate would put about $50 billion at risk during a mass deportation.

Or another scenario could involve a person who enters legally under a multiyear visa, amasses debt, overstays that visa, and then is deported. The credit costs of deporting undocumented immigrants could be high and avoidable. Is it really worth damaging the economy by deporting immigrants who make consistent payments as responsible borrowers?

Deporting undocumented immigrants can also create costs tied to the dependents, such as the children and the elderly whom they leave behind. Many undocumented immigrants, for example, have children who are U.S. citizens because they were born in the U.S. About 8 percent of all births in the U.S. are to unauthorized immigrants, with about 4.5 million children living with undocumented immigrant parents.

As these children are not financially independent, deporting their parents can lead to child care costs and other indirect costs that will be borne over time. A stable family environment leads to better educational and career outcomes while helping to reduce criminality. Separating families risks increasing poverty, which, in turn, could worsen educational outcomes. This reduces future tax revenue and increases future welfare expenditure.

Deportations have some immediate costs as well, including the costs of hiring more U.S. Department of Homeland Security Immigration and Customs Enforcement agents to round up undocumented immigrants. They also create court costs.

Court costs are large: Paying for judges and lawyers is expensive. There is currently a backlog of more than 500,000 deportation cases, which on average have been open for more than 600 days. More lawyers and judges will need to be hired or this backlog will only worsen.

And then there is the opportunity cost of not being able to put those resources to another use. Increased deportations will only amplify these costs.

Los Angeles city leaders, for example, have proposed a $10 million fund to help deportees fight deportation in the courts. This will clearly add to the number of cases flowing through immigration courts.

In 2016, ICE reported that it removed 240,255 undocumented immigrants. President Trump has said he plans to deport 2 million to 3 million undocumented immigrants.

Assuming the deportations are spread out over a four-year period, this essentially doubles ICE’s workload. This would dramatically increase enforcement costs, which are already starting to pile up. President Trump has announced the hiring of an additional 5,000 Border Patrol officers and 10,000 additional ICE officers.

The Migration Policy Institute estimates that about 820,000 undocumented immigrants have criminal records (for any crime), so hitting his target may also involve deporting quite a few who haven’t committed a criminal offense, as we’re already seeing.

The American Action Forum suggests that the increased workload would have dramatic cost implications. The center-right think tank estimates that the cost of deporting all 11 million undocumented immigrants over two years would be $400 billion to $600 billion in terms of increase court, labor, and facilities costs. Thus deporting 1 million immigrants could potentially cost more than $35 billion to $55 billion. This is a conservative estimate, as it ignores the impact of economies of scale that reduce the deportation cost per person as more people are deported.

This all suggests that deportation could carry significant direct costs and should be a core concern for a fiscally prudent government, which the current administration and the GOP claim to be.

Lastly, rounding up undocumented immigrants will affect the job market and economic growth. The economic benefits of immigration have been well established in a report by the National Academy of Sciences, Engineering, and Medicine.

The American Action Forum estimates that removing all 11 million immigrants would decrease the labor force by 6 percent and cut GDP by $1.6 trillion, or about 8.5 percent, based on Bureau of Economic Analysis figures. The administration does not currently intend to deport all 11 million immigrants, so the deportations under consideration would have a smaller impact. This is at least partly because criminals are less likely to be employed or have worse jobs if they are.

Nevertheless, there would be a cost. This is because undocumented immigrants’ labor is not directly substitutable with that of other workers. Undocumented immigrants typically work in less desirable jobs that Americans might not want and might work at a lower cost. Therefore, companies might need to pay more to replace undocumented workers, resulting in reduced capacity to hire and grow.

These factors mean that the government must think carefully before aggressively pursuing undocumented immigrants. There are significant costs associated with deportations, and the government should consider them carefully when weighing its policy objectives.