Perhaps the only aspect of immigration on which all the Republican presidential candidates agree is that unauthorized immigration is undesirable. When it comes to plans for credibly reducing the number of unauthorized immigrants and dealing with those who are already here, the candidates’ positions diverge. Whether some of those positions are grounded in reality is debatable.

There are several key takeaways from decades of research by economists, sociologists and others that politicians should consider when creating plans to tackle unauthorized immigration.

First, building a wall around the United States will not end illegal immigration. A substantial share — at least 40 percent — of people who are not supposed to be here entered legally but didn’t leave when their visa expired. A wall will do nothing to reduce the number of visa overstayers. We need a better way to track where people on temporary visas are and whether they leave.

Second, we need to address the root cause of most unauthorized immigration: the jobs magnet. We all certainly want the economy to grow, but growth encourages unauthorized immigration — it means employers need more workers.

Unauthorized immigrants are often an important source of labor in booming areas because they’re more willing to go where the jobs are. They’re also more willing to take the physically demanding jobs that Americans don’t want or need to take, especially if other jobs are readily available.

Addressing the jobs magnet requires a multifaceted approach. One important part is making it more difficult for people without legal permission to work to do so, such as by requiring all employers to verify workers’ employment eligibility.

Another important part is providing better ways for employers to hire foreign workers when not enough American workers are available and willing to take jobs. This is particularly true when there is strong demand for workers and for jobs that are in isolated places, are temporary, or are particularly arduous and hence hard to fill.

We need to reform our temporary foreign worker programs, which are incredibly cumbersome for employers to use. Employers have to begin the process far in advance of when they need workers and must muddle through many layers of bureaucracy, including filing forms with multiple government agencies. And, in the case of seasonal non-farm workers, they may do all this only to find out that none of the 66,000 visas available annually are left.

The difficulty of using our current temporary worker programs creates an incentive for employers to turn a blind eye to workers’ legal status. After all, there are some 11 million unauthorized immigrants already in the United States they can easily hire instead.

Addressing unauthorized immigrants who are already here is far more challenging. Deporting millions of people would wreak havoc on families and on the economy. Yet we know that our last legalization, or amnesty, program was plagued with fraud and did not stem the continued inflow of unauthorized immigrants. We also know that it led to higher incomes among newly legalized immigrants and to better educational outcomes for their children.

Creating ways for unauthorized immigrants who have worked here for years to obtain legal status would improve their bargaining power with employers and boost economic efficiency by enabling them to move jobs more easily. Doing so would also help reduce adverse effects on the least-skilled American workers who compete with unauthorized immigrants for jobs.

Successfully reducing the number of unauthorized immigrants in a growing economy creates a paradox: it pushes up wages and leads to job vacancies, which in turn boosts unauthorized immigration. Tackling unauthorized immigration therefore requires creating ways for more workers to come legally, particularly in times of robust economic growth.