We Americans have been confronted by devastating images from our southern border and increasingly polarized views on how to address this untenable situation.

At times I wonder if we are retreating from the ideal of America as a country founded by and for brave, bold, freedom-seeking rebels, and becoming instead inward-looking and fearful.

I suspect many of us will refuse to retreat. We grew up in this beautiful, free country, in all its diversity. We know nothing good ever came of fear, and that our own history — including the shameful mistreatment of Native Americans — should incline us to humility and respect when considering the question of migration.

I’m not a lawyer, an asylum seeker, or one of the people working every day to protect our borders and run our immigration system. But I work with the UN Refugee Agency, which operates in 134 countries to protect and support many of the over 70 million people displaced by conflict and persecution.

We in America are starting to experience on our borders some of the pressures other nations have faced for years: countries like Turkey, Uganda and Sudan, which host 6 million refugees between them. Or Lebanon, where every sixth person is a refugee. Or Colombia, which is hosting over 1 million Venezuelans in a country slightly less than twice the size of Texas. There are lessons — and warnings — we can derive from the global refugee situation.

The first is that this is about more than just one border. Unless we address the factors forcing people to move, from war to economic desperation to climate change, we will face ever-growing human displacement. If you don’t address these problems at their source, you will always have people at your borders. People fleeing out of desperation will brave any obstacle in front of them.

U.S. Border Patrol agents watch over immigrants after taking them into custody on July 02, 2019 in Los Ebanos, Texas. John Moore—Getty Images

Second, countries producing the migration or refugee flow have the greatest responsibility to take measures to protect their citizens and address the insecurity, corruption and violence causing people to flee. But assisting them with that task is in our interest. Former senior military figures urge the restoration of U.S. aid to Honduras, Guatemala and El Salvador, arguing that helping to build the rule of law, respect for human rights and stability is the only way to create alternatives to migration. The UN Refugee Agency is calling for an urgent summit of governments in the Americas to address the displacement crisis. These seem logical, overdue steps. Our development assistance to other countries is not a bargaining chip, it is an investment in our long-term security. Showing leadership and working with other countries is a measure of strength, not a sign of weakness.

Third, we have a vital interest in upholding international laws and standards on asylum and protection. It is troubling to see our country backing away from these, while expecting other countries, who are hosting millions of refugees and asylum seekers, to adhere to a stricter code. If we go down this path, we risk a race to the bottom and far greater chaos. An international rules-based system brings order. Breaking international standards only encourages more rule-breaking.

Fourth, the legal experts I meet suggest there are ways of making the immigration system function much more effectively, fairly and humanely. For instance, by resourcing the immigration courts to address the enormous backlog of cases built up over years. They argue this would help enable prompt determination of who legally qualifies for protection and who does not, and at the same time disincentivize anyone inclined to misuse the asylum system for economic or other reasons. The American Bar Association and other legal scholars and associations are calling for immigration court to be made independent and free from external influence, so that cases can be fairly, efficiently and impartially decided under the law.

There are also proven models of working with legal firms to provide pro-bono legal assistance to unaccompanied children in the immigration system without increasing the burden on the U.S. taxpayer. Expanding these kinds of initiative would help to ensure that vulnerable children don’t have to represent themselves in court, and improve the effectiveness, fairness and speed of immigration proceedings. Approximately 65% of children in the U.S. immigration system still face court without an attorney.

We all want our borders to be secure and our laws to be upheld, but it is not true that we face a choice between security and our humanity: between sealing our country off and turning our back to the world on the one hand, or having open borders on the other. The best way of protecting our security is by upholding our values and addressing the roots of this crisis. We can be fearless, generous and open-minded in seeking solutions.

Contact us at letters@time.com.