As the world watches — often with alarm — as the worst refugee crisis in a quarter-century unfolds, it’s important to view the potential immigrants for what they can be: Productive members of their newly adopted countries.

Thirty-five years ago, I was one of those refugees, embarking on a harrowing journey as my family fled the horrors of the Soviet-backed regime in Afghanistan.

Now, like then, men, women and children in desperate situations are gambling with their lives and using whatever means they can in an attempt to escape the misery of war-torn or impoverished countries in the hope of securing a better life in the West.

Thirty-five years ago, I was one of those refugees, embarking on a harrowing journey as my family fled the horrors of the Soviet-backed regime in Afghanistan.

There is drama and heartache in the headlines. In recent days, 71 would-be refugees, most likely from Syria, were left to suffocate on the side of a road in Austria, abandoned and locked inside the back of an airless truck. Off the coast of Libya, 51 bodies were found in the hold of a ship and another 150 people were presumed drowned after two boats capsized.

The Mediterranean Sea has been called “the world’s deadliest border” because so many desperately seeking asylum have died trying to cross it — more than 2,600 this year, according to the International Organization for Migration. The mistreatment often begins with smugglers, who dangerously pack the refugees onto small boats that were likely not designed to cross any sea.

More than 300,000 refugees have tried to cross the Mediterranean this year, the United Nations reports. The lucky ones make it to Europe, but often find no refuge. Instead, they are greeted by razor-wire fences like the one Hungary built to essentially close its borders. Or they receive a message that they are clearly unwanted, one that is telegraphed by states squabbling over how to handle the influx of immigrants and an absence of centers to help meet their needs and process them.

The United States had taken in fewer than 1,000 Syrian refugees as of June but will accept between 5,000 to 8,000 next year, the State Department announced in late August. The sheer number of people fleeing war-torn countries can make the refugees seem faceless. More than 4 million in Syria have become homeless since civil war broke out in that country in 2010, according to media reports.

My family is a reminder of the human faces attached to those numbers. We were once as desperate as the Syrian refugees are today. We contemplated being smuggled across the border to Pakistan in our after-dinner conversations and whispered exchanges between my parents.

Every family we knew tried to get their kids out by any means possible. Families were broken apart, children sent in different directions — anywhere as long as they were out of immediate harm.

I was 18, a student and still too young for conscription, and applied for a passport under the pretense that I was accompanying a “sick” cousin to seek treatment abroad. I soon left Afghanistan and the “sick” cousin behind.

My older brother, then a medical student, walked for days with smugglers to make it across the Pakistan border. Upon arriving, he found out that our cousin Shahwali, a brilliant 20-year-old in his second year of medical school, had suffocated in the back of a truck while being smuggled out of Afghanistan. He died in the arms of his older brother in the border town of Peshawar. Their father had been shot dead months before while driving to an early anti-government protest in Afghanistan.

The rest of my immediate family fled Afghanistan within months of my departure. They waited in India to receive asylum from the United States while my brother and I waited in Italy for our visas. By 1982, the seven members of my immediate family were reunited in America, bruised and facing an uncertain future in an unfamiliar place but buoyed by the hopes and dreams in a place that had been billed as the land of opportunity.

And opportunity we found. Everyone in my family worked hard, seemingly harder than our American peers, to achieve our version of the American dream and make a lasting mark. When I see news photographs of bodies of refugees that have washed up on the shores of Europe, I often think of the stunning loss of my amazing cousin, whose dreams died along with him in that container truck. How much more air would he have needed to be able to continue his journey of hope? His siblings who made it to the United States became a physician, computer scientist, businessman and a public servant.

As politicians in the West struggle with how to deal with this incredible surge in refugees, the world needs to remember to treat them humanely and with dignity. They are people, awaiting their fate. By welcoming and accepting them, the West can send their oppressors a message regarding what it means to be a free democratic society.

Obaid Younossi is a senior management scientist at the nonprofit, nonpartisan RAND Corporation.