During the national debate over how best to fix our broken immigration system, border security has been at the forefront of the discussion. That’s as it should be.

While we have made progress in securing our southern border, there remain areas — including in my own district — where people who live and work near the border do not feel safe.

But when it comes to the border, there is another kind of security that we in Southern Arizona cannot afford to overlook: economic security.

Mexico is Arizona’s largest trading partner – and our nation’s second-largest. Unless we devote adequate resources to modernizing the ports of entry on our southern border, we risk the 6 million U.S. jobs that depend on trade with Mexico.

Well-designed and adequately staffed ports of entry should act as efficient filters – allowing legal commerce and travelers to flow through quickly, while stopping criminals, smugglers, weapons, drugs and those trying to enter our country illegally.

Currently those whose livelihood depends on moving efficiently through one of the 47 land ports between the United States and Mexico know that the reasonable demands of security frequently lead to unreasonable waits for produce, manufactured products, other legal goods and tourists to cross the border.

So what is the state of America’s land ports? It’s an important question without a satisfactory answer.

According to an audit by the Government Accountability Office, data collected by U.S. Customs and Border Protection on waiting times at the ports is unreliable.

For example, some border officers estimate waiting times by observing the end of the line of vehicles. But the lines often are so long that the officers couldn’t see the end and couldn’t estimate wait times.

Are more Customs officers needed at our ports? CBP says yes – 3,811 more officers are needed, a sentiment echoed to me and my staff whenever we visit the ports of entry in Southern Arizona. But when GAO auditors visited ports, staff members at half of them said they had enough officers.

Adequate staffing is only half of the equation. We also must improve the ports’ physical facilities.

Here in Southern Arizona, we know how bad ports can be — and how good they can become.

At one end of our state is the antiquated port in Douglas — built in 1932 when Herbert Hoover was president and only 435,000 people lived in Arizona. The federal government declared the port “wholly inadequate” several years ago — but it still is years away from being expanded and brought into the 21st century.

The Douglas port is choking off legitimate trade in Cochise County and costing the city, county and state untold millions in lost revenue because cargo can’t pass through in a timely manner. A semi full of produce that spoils waiting to enter the U.S. can cost the shipper tens of thousands of dollars — not to mention the vast waste of fuel and time from frustrated truckers and travelers.

Local officials are working diligently to make the most of what they have. Most recently, Douglas Mayor Danny Ortega and other stakeholders worked with CBP to open a SENTRI lane to expedite regular traffic through one of the lanes. It is a positive step, but more must be done.

Contrast that to the massive expansion at the Mariposa port of entry in Nogales. When completed next year, construction will have added eight lanes for commercial traffic and 12 for private vehicles. There is a new bus lane, 56 commercial docks, five exit booths, 24 inspection areas, 400 parking spaces and two southbound lanes.

It cost $200 million, but in a short time it will more than repay that cost in increased commerce between the United States and Mexico – if we ensure it has the proper staffing.

The bottom line is this: There are millions of dollars in trade opportunities and thousands of jobs in both our country and Mexico that depend on prompt, dependable cross-border commerce.

But many — indeed most — of our land ports are acting more like chokepoints than entry ways.

We can and must have both border security and economic security, which comes through secure and well-functioning ports. Investing in our aging port system must be an integral part of fixing our broken immigration system.

Congressman Ron Barber represents Southern Arizona’s District 2. Contact him through his website, barber.house.gov and his Facebook page, RepRonBarber.