For the first 48 hours after President Donald Trump signed his executive order on immigration, me and my co-workers at the Dubai airport were scrambling to figure out how to implement it.

We were checking the Guardian and the BBC for clues on what the order meant, while our colleagues in American airports were learning details from CNN – accepting or rejecting passengers based on the latest news.

Like many airport workers around the world, I have been handed the unwelcome task of enforcing Trump’s executive order over the past week, with little or no guidance from the US government.

I’ve watched green card holders get turned away; even dual-national US citizens from the respective countries have been prevented from boarding flights.

Trump’s order bans entry to the United States to all people from Syria, Sudan, Somalia, Yemen, Iraq, Iran and Libya. Airlines get stuck with the cost of sending passengers back to where they came from if they are denied entry to the United States, making it in an airline’s interest to ensure that nobody who may get turned back boards a flight. We also don’t want to send a passenger somewhere when they may end up detained.

Mixed messages and confusion reigned on the first day following Trump’s order. Officers responsible for checking documents told me that green card holders and US dual nationals should not be allowed on flights while another told me the opposite.

Turning people away was heart-wrenching; my colleagues and I were in disbelief. For instance, one Syrian woman with a green card – who had lived in the US for decades – was turned away due to the order. We also couldn’t send her to 95% of our destinations as she holds a Syrian passport, which left her stuck in the airport for 48 hours – even Dubai does not allow Syrians to enter without a visa.

Dubai is a transit hub for the region and people with the listed nationalities often pass through the airport. My colleague who deals with inadmissible passengers said there were dozens in the first day. I heard about two Syrian doctors who were coming from Saudi Arabia and had US visitor visas. They were sent back to Saudi and forfeited the money they’d spent on hotels and flights.

Usually, airlines use a system called Timatic to determine if a passenger has the necessary documentation to fly to their destination. Timatic was not updated to reflect the executive order, as the US government failed to notify the International Air Transport Association, which operates the database, about the changes. This created a lottery system where passengers’ fates were decided on the fly.

Whenever we came across someone who may potentially be banned under the order, we contacted the US Customs and Border Protection and put in a more informal call to the airport the person was destined for to ensure they’d be granted entry. Some airports said yes, others said no, while some depended on what time and who was on duty. The mood of security officials in Dubai also [was] a factor.

By Sunday afternoon, the process became more formalized, where anybody with a nationality from one of these countries was flagged instantly and taken for additional screening. Green card holders were from then on allowed to board, but it’s my guess that any other visa holders will be denied.

I’m not sure what political games the president thinks he’s playing, but I’ve seen first-hand how this ridiculous order is ruining people’s lives.