When I leave Santiago to return to Dublin this August I’ll have spent the bulk of two years between Spain and Chile. During my stint abroad I have seen the inequalities between immigrants of different ethnicities. Reading about the recent attack on the Ahmadzai family in Rathfarnham in Dublin, I was both worried about what it signified and heartened by the community protest that followed.

Like many Irish families, mine has a long history of forced emigration on both sides; that emigration continues right up to my generation. But I chose to leave Dublin, seeing it as an opportunity to enjoy a new lifestyle and a way to put my Spanish and film-studies degree to use.

In Madrid and Santiago I’ve survived financially by teaching English as a foreign language. But the real focus of my energy has been making two short documentaries about migrant labour. This has introduced me to the reality of emigration for those not considered to be from the right part of the world.

My experience as an Irish immigrant has been a world away from that of Hashem and Alicia, the subjects of my documentaries. I have come to Spain and Chile as a valued equal for whom every door has been opened. Hashem and Alicia have come as members of a marginalised underclass of immigrants who are given almost no opportunities.

In Madrid I was welcomed into my workplace, supported as I struggled to teach English to toddlers, and embraced socially by my colleagues. In Santiago, strangers have complimented me for learning their language, I have been thanked for coming so far to “share my knowledge” and have been invited into homes and offered delicious local food.

My welcome as an immigrant in both Spain and Chile has given me a profound connection to each culture that I will savour for life. But the inequalities for immigrants of different ethnicities have left me uneasy.

Hashem, who is from Bangladesh, is a former politician who ran his own carpentry business. After a change in government and threats on his life, he fled to Spain. His wife and three children stayed behind. He has spent his six years in the country selling cans of beer on the streets to Madrid’s all-night revellers. When it rains he sells umbrellas to unprepared commuters. Hashem speaks Bengali, English and Spanish. Despite his experience and skills he has never come close to getting a legitimate job in Spain. Nor has he been able to acquire a residency visa.

Alicia, who is Peruvian, sells freshly squeezed orange juice on the street. Although she has no formal education, Alicia is extremely bright, enterprising and strong. For 11 years she raised her two children while working as a live-in maid on a salary of just over €150 a month. Late last year she quit this job to try to earn a better living. She bought a trolley, was sent an orange press from Peru and began travelling three times a week to the market, where she buys up to 60kg of oranges per trip. Before dawn she fills her trolley with the fruit, wheels it across town and sells the juice for €1.30 a cup until the afternoon.

Rather than being welcomed into their new countries and offered a helping hand, as I have been, Hashem and Alicia have been left out on the street to find their own way to survive. This is not because of their capabilities or personalities but because of their countries of origin.

In conversations with other western immigrants in Madrid and Santiago I have always been referred to as an expat. Until recently I have always called myself an Irish emigrant. When my Swedish girlfriend suggested I someday enrol on a free “Swedish for immigrants” course in her country I balked at the idea of myself as an immigrant. I am still ashamed to admit that the xenophobic trope that paints immigrants as burdens who steal jobs and state resources had ingrained itself in my subconscious.

“Expatriate”, “emigrant” and “immigrant” are defined differently, but they essentially mean the same thing: a person not living in his or her native country. Our use of each word communicates not the nuances of a migrant’s movement but how we view the person. Why did I still refer to myself as an Irish emigrant and not as an immigrant? Why is it that only westerners – primarily white westerners – are called expats?

Our unspoken prejudice has made these terms western immigrants’ code words to differentiate ourselves from what we unconsciously see as our ethnically inferior peers.

Having lived as a very privileged immigrant for the best part of two years, and having spent a significant part of that time with less fortunate immigrants, I can see this racist classification at work every day.

The differences between the Spanish and Chilean people and me are at best an excellent icebreaker, at worst a source of friendly teasing. When I say something incorrectly in Spanish I might be laughed at, but I am eventually helped to correct my error. My sickly pale skin is a topic of good-humoured conversation.

For Hashem and Alicia the reactions to their differences are not so benign. An imitation of Hashem and his fellow Bangladeshi beer sellers’ accented pronunciation has become the shorthand used to ridicule anyone of a particular ethnicity in Madrid. Alicia’s dark skin and indigenous features greatly limit her employment prospects in Chile.

As racism, xenophobia and Islamophobia rise all over the world, it scares me to see such extremism in Ireland. I’d love to return to an Ireland that rejected the racist segregation of categories of immigrants from which I’ve benefited abroad. It would bring me great joy to come back to a country where the kind of hatred we saw in Rathfarnham a few weeks ago had no label other than brutal criminality.

I’d love if the hospitality I’ve received in Spain and Chile, and that which so many Irish emigrants who share their stories in Generation Emigration have enjoyed, could be extended to every immigrant we’re lucky enough to receive on our tiny island, regardless of their ethnicity or religion. That is the kind of home I want to help shape on my return.