Alan Bersin testifies before the House Oversight and Government Reform Committee in Washington, Dec. 17, 2015. J. Scott Applewhite/AP

It’s hard to find anyone in Washington who knows border issues better than Alan Bersin.

His unique perspective combines years of frontline law enforcement experience with academic knowledge and intellectual interest in the historical, economic and social forces that are at work at the borders of the United States, especially the US-Mexico line.

Bersin became US attorney in San Diego in 1993 and subsequently spent almost five years as President Clinton’s “border czar,” overseeing a border-wide crackdown on illegal immigration and drug smuggling.

During the Obama administration, he served in several key posts in the Department of Homeland Security, including as acting commissioner of Customs and Border Protection, the force of 58,000 employees that includes the US Border Patrol as well as CBP officers guarding air, land and sea ports of entry. He later served as assistant secretary for international affairs and chief diplomatic officer at DHS, a job he left last month.

ProPublica sat down to talk with him about the history, politics, rhetoric and reality surrounding the border issues that are driving a fierce national debate during the first weeks of the Trump administration.

ProPublica: In the presidential campaign last year and in political discourse in general, the US-Mexico border has consistently been depicted as out of control. How does that compare to the turf you have come to know during the past 25 years?

Bersin: When I began as US attorney in San Diego during the Clinton administration in 1993, the border was in fact out of control. Illegal immigration was rampant. The federal government’s reaction, and the efforts of three administrations, gradually changed that.

Over that period, the government was spending up to $18 billion a year geared to strengthening the border. We went from 3,000 Border Patrol agents to 22,000 agents today, more than 18,000 of them on the southwest border. There were massive investments in technology, air reconnaissance, sensors. This completely altered the border.

In 1993 and 1994, the Justice Department launched two operations: Hold the Line in El Paso and Gatekeeper in San Diego, the areas where almost all of the illegal crossing was concentrated because it was so easy to cross. The Border Patrol was able to get control of those flows.

The strategy had two goals: putting more agents on the line to apprehend people and create a deterrent to crossing, and spreading the traffic out. A critical dimension was the construction of fences and barriers and walls along 700 miles of the 1,900 miles of the border. The type of barrier depended on the terrain. There is triple fencing in San Diego, and significant barriers in places like Nogales and Yuma, Arizona and El Paso and Brownsville, Texas.

The idea was to restore the rule of law, to bring order to a chaotic situation. The results became more and more apparent. Crime rates went down in the border region. Today, the number of migrants crossing is at a 30-year low. That’s because of years of bipartisan work on this issue.

Has it achieved a complete sealing of the border? No. But it has achieved equilibrium and more effective management. During the last 10 years we have also seen the beginning of joint border management with Mexico. In the course of 25 years, we have developed a constructive relationship with Mexico that was nonexistent before. During the last eight to 10 years there have been continued efforts which have resulted in a strategic alliance with the Mexicans and improved safety and security at the border.

A Border Patrol vehicle sits along the US-Mexico border wall on Jan. 25, 2017 in San Ysidro, California. Sandy Huffaker/Getty Images

A major contribution has come from the changing nature of migration. People should remember that Mexican migration is now at a net negative. More Mexicans are leaving through deportation, and voluntary return, than are entering the United States legally and illegally.

In part, that’s a result of our efforts on border enforcement. But it’s also because Mexico now has the 13th largest economy in the world. The Organization for Economic Cooperation and Development predicts it will have a larger economy than Germany by 2042.

The Mexican people are increasingly middle class, and Mexico has substantially become a middle-class society. This is true despite the significant poverty, and the class and geographic inequality that have deep historical roots. Part of this process of change, as was the case in our own country, involves a difficult battle against organized crime. Nonetheless, Mexico has become a robust democracy with a robust press and an active legislature. It has gone from being a sending country for migrants to a transit country, and increasingly a receiving country for migrants in its own right.

Not only are the numbers of migrants entering the US at the lowest levels in a generation, but they are now largely Central American. Four out of five border-crossers detained in South Texas are Guatemalan, Honduran or Salvadoran. They are driven by violence and poverty in their home countries and the desire for family reunification.

Indeed, many of the illegal crossers who have entered the country in the last two years after being detained have actually been either unaccompanied minors or families who request political asylum. The ability of the smugglers to attract large numbers of families and unaccompanied minors is a function of the inability of our immigration court system to process asylum claims in a timely fashion.

Undocumented immigrants wait in a holding cell at a US Border Patrol processing center on Sept. 8, 2014 in McAllen, Texas. The sign, written by the US Centers for Disease Control (CDC), reads 'Keep Calm and Wash Your Hands.' John Moore/Getty Images

So the key to responding to the increase in Central American minors and families is less at the border than in the immigration bureaucracy?

Yes. The difficulty is twofold. First, the law change during the Bush administration gave the Department of Health and Human Services a central role in relocating Central American minors in the United States. (HHS has an Office of Refugee Resettlement that is responsible for sheltering and processing migrant children and teenagers.) HHS has implemented this law by reuniting children with their families, many of whom had entered illegally. This has unintentionally made HHS the last link in the smuggling chain from Central America and created a legal incentive for the continued illegal migration of minors.

The second issue is the longtime lack of funding and resources for the immigration court system. Migrants come up and no longer seek to evade the Border Patrol, but are actually left at the border by their smugglers. And they seek out Border Patrol agents or Customs and Border Protection officials to surrender to them and request political asylum. That’s the way in which they get entry into a system that will eventually release them into the country.

Not because the system was designed that way, but because that is the practical result of an immigration court system that was never resourced by Congress. Notwithstanding the requests of the Obama administration, it was still not funded by Congress to be able to provide timely hearings and adjudication of immigration benefits.

If there were a rapid method of adjudicating claims, we wouldn’t see what has occurred on the scale on which it has — people paroled into the country with hearings set for two, three, four years in the future. Often, they don’t show up for their hearings. And often, during the time they are in the country waiting for the immigration hearing, they are having children and developing community ties.

They generate real reasons to claim a right to remain, even though they’ve never been given a legal status. The bipartisan failure to build an effective immigration court system capable continues. It’s part and parcel of the general observation that the immigration system is broken.

Donald Trump and Mexico's President Enrique Pena Nieto arrive for a press conference at the Los Pinos residence in Mexico City. Reuters/Henry Romero

The opening salvo in President Trump’s campaign last year, one that came to define this presidency in many ways, was a promise to build a wall on the border and make Mexico pay for it. What do you think of that idea?

I think there’s no question that the barriers, the fences and in certain urban areas, the walls, have had an important effect in terms of increasing the manageability and the security of the border. But in fact as [Secretary of Homeland Security] General [John] Kelly acknowledged at his confirmation hearing, walls and barriers alone are insufficient to insure security.

As [former Homeland Security] Secretary [Janet] Napolitano pointed out, if you build a 50-foot wall, you’ll soon be confronted with a 51-foot ladder. You need a strategy that involves layered defense: deployed patrols, sophisticated sensor equipment, and surveillance from the air. That is what has had a positive impact over the last generation.