In Southern California on February 3, a 24-year-old named Emad El-Sayed, an Egyptian Muslim, logged onto Facebook and posted what could be considered a death threat against one of the candidates running for President of the United States. El-Sayed added that he would be “doing the world a favor.” The young man was in the United States on a student visa, studying at the Universal Air Academy in Los Angeles.

When authorities at the flight academy saw the Facebook post, they reported El-Sayed to federal immigration officials and revoked his I-20, the document verifying that a school supports a foreign national’s student visa.

Without his I-20, El-Sayed’s student visa was null, and he became automatically in violation of his terms of admission to the United States. Although the post certainly didn’t appear to be a legitimate threat, jokes in poor taste and other questionable comments posted online can jeopardize someone’s legal status in the United States.

As recently as five years ago, the internet wasn’t considered very important by immigration authorities, but as it becomes increasingly linked to security threats and terrorism, the internet now comes up in every part of immigration investigations.

“Immigration officers are absolutely looking at social media,” one immigration attorney told Vice.com. “We’ve come to realize that, when it comes to immigration issues, the government will definitely use social media to investigate an individual.”

WHAT ARE IMMIGRATION AUTHORITIES LOOKING FOR?

Mostly, immigration authorities are looking online for any evidence of fraud, inconsistencies in someone’s testimony, or illegal activity. Another immigration lawyer told Vice that immigration officers “routinely review social media in making assessments of eligibility for immigration status, or alternatively, if they are planning on charging someone with a violation of immigration law.” Any immigrant with concerns regarding online comments or photos may want to discuss those concerns with an experienced Las Vegas immigration attorney.

Even something that could not convict a person of a crime – like a single photograph posted on Facebook showing someone allegedly taking illegal drugs in the past – can be a sufficient reason to deny a person’s visa application in the present. “I’ve seen that happen in the past, where the client had pictures of illegal activity,” the attorney said. “The government brought printouts from social media into court.”

As for those individuals who are already in the United States, El-Sayed isn’t the first person to have his immigration status challenged because of a threat allegedly made online. In December 2014, Keshav Mukund Bhide, a 24-year-old student from India, was deported after he posted comments on Google+ about planning a campus shooting at the University of Washington.

And in March of this year, Hanxiang Ni, a 22-year-old Chinese student at the University of Iowa, was deported because of an alleged threat that he posted on Weibo, which, according to the Daily Iowan, promised to “let [his] professors experience the fear of Lu Gang.” Lu Gang, a Chinese graduate student, and the shooter in a 1991 campus shooting at the University of Iowa, killed four of the university’s faculty members.

WHAT’S A THREAT – AND WHAT’S A JOKE?

The problem faced by immigration authorities investigating comments posted on the internet – especially those posted by university students – is determining what’s a genuine threat and what’s simply a joke. In 2012, a pair of Irish tourists were denied entry into the United States after one of them tweeted: “Free this week for a quick gossip/prep before I go and destroy America?”

Emad El-Sayed told reporters that what he wrote on Facebook was just “a stupid post,” without any real threat attached. But immigration attorneys say the line between a joke and a threat is razor thin. “I’ve seen things like this rise to the level where [it is treated as] an alleged terrorist threat,” said one immigration lawyer. “It’s unfortunate in the immigration context, because if an American citizen made a similar comment – and I’m sure many have – those aren’t a problem.”

El-Sayed’s case is complicated by his enrollment in a flight academy. Flight schools, in particular, have been ton “high alert” since the 9/11 hijackers learned to fly planes at American flight schools. Flight schools “were really under the microscope for several years after 9/11, because of who they admitted to their schools,” another immigration attorney told Vice. “I can kind of understand why a flight school might be hypersensitive to those kinds of statements, but I think that it was probably an overreaction,” the attorney said.

If you are an immigrant in the United States or if you are hoping to enter the United States in the future, it’s imperative to understand that anything you post on the internet can be used against you. Immigrants and those seeking entry to the United States shouldn’t do anything illegal that might jeopardize their immigration status. If you put something on the internet, it’s forever, and even if you delete it, there’s still a record of it somewhere.

In March, Emad El-Sayed’s legal team requested a voluntary departure, which would allow him to leave the United States and return to Egypt without having a deportation on his record. That request was granted, and a representative from his attorney’s office confirmed that El-Sayed will soon be boarding an Egypt Air flight back to Egypt. He will return to Cairo where his family lives, his attorney said.

ARE THERE ADDITIONAL REASONS TO USE CAUTION ONLINE?

Another reason why immigrants need to be careful online is to protect themselves from criminals and con artists. Immigrants are natural targets for criminals. These scam artists collect information wherever they find it, and they use it to convince their victims of their legitimacy. Just because a person knows your name and where you’re from does not mean that person has any authority as an immigration official or an as immigration lawyer.

Immigrants in the U.S. should trust only a licensed and practicing attorney – someone like an experienced Las Vegas immigration attorney. The right lawyer will give you sound legal advice and can help you to achieve your goals in the United States. And as far as the internet is concerned, the less you say online about your time in the United States or your current immigration status, the better.