It's the nightmare situation nobody wants to be in.

"C'est juste un peu frustrant," said Ayoub Elaassal in a tweet last week, describing his frustration. He just found out that he had been denied entry to the US, just days before he was set to fly out from where he lives in Paris to speak at the Black Hat conference in Las Vegas.

A few days earlier, Elaassal, a Moroccan native who has dual citizenship with France, traveled to the US Embassy in Paris with a wealth of documentation to apply for a 10-year visa, but he was denied. "The guy who was questioning me said that the visa was refused," he told ZDNet on the phone last week. According to Elaassal, the consular official told him that it's likely because he holds a Moroccan passport. "He said that you are Moroccan and you work in security in France, and that triggered the alarm system," Elaassal said. He was told that he could file an appeal through an administrative process, which would send his file to Washington DC, a process that would've taken months.

He went home, and as a last ditch effort to make his flight, applied for a three-month visa waiver with his French passport. He waited for two painstaking hours to be told that this too was denied.

"It just says, 'you're not authorized to go'," he said. "It's not like I had problems before, that's what bothering me," Elaassal added, listing the countries he had been to in the past few years -- none of which would've raised red flags.

Another visa applicant we spoke to was also denied a visa to attend Black Hat.

Magda Chelly, a cybersecurity professional, is a Polish citizen who also holds a Tunisian passport. She now lives in Singapore, where she owns and runs a business and pays taxes to the state. She shared the visa rejection letter from the US Embassy with ZDNet. "You have not demonstrated that you have strong ties overseas that will compel you to return to your home country after your temporary visit to the United States," the letter wrote.

"It doesn't make sense to consider myself not having enough ties in Singapore," she said. "I was so disappointed."

Elaassal and Chelly are the latest public casualties in what's widely seen as an offensive on immigration by the Trump administration in recent months, a marked escalation since the Obama years, which also faced criticism for one of the harshest immigration regimes in living memory.

The US has long been a hub for international conferences, a place where free speech prevails for academics and researchers to reveal their latest findings. But since the uptick in immigration restrictions in recent months and the so-called travel ban that was ordered earlier this year, many have shunned the US as an international pariah. Many would-be conference attendees were automatically barred from the US under the travel ban, while others have boycotted conferences and withdrawn their participation in protest of the travel restrictions.

Several conferences have already felt the heat, while others have considered holding events outside the US in more friendly climes.

Black Hat general manager Steve Wylie said that the conference has "not seen anything out of the ordinary this year or anything directly related to the Executive Order at this time," but he described Elaassal's situation as "unfortunate."

Wylie said Black Hat is "dedicated to offering a neutral platform for all information security professionals, both domestic and international." Black Hat also holds several regional conferences around the world during the year.

It's not known what the official reason is for Elaassal's denial. State Department officials are prohibited from commenting on individual visa cases.

But one leading immigration lawyer said it's "not uncommon" for discrimination to play out at the border or overseas consulates.

"I recently spoke to a former State Department official who said that consular officers have almost unfettered discretion to make visa determinations," said Sophie Alcorn. An immigration official in a bad mood can hand out a visa denial even if a person is eligible for immigration status, and visa waivers are often subject to even less review.

"In my experience, single, childless Muslims, and Arabic men are subject to higher denial rates simply because they bear more in common with what's perceived as a 'terrorist profile'," she said. "And yet these individuals include a lot of very brilliant, intelligent, educated people who are work in tech, or are investors, or run companies, who want to advance knowledge and create jobs in America -- it's very frustrating."

"Tensions are higher and decisions are bolder," Alcorn said.

"The rhetoric from the presidential administration is trickling down to immigration officers," Alcorn said. "They feel wider discretion compared to the previous administration." She added that even though there has been nothing in way of legislative immigration reform, the rhetoric "sends the message that immigrants aren't welcome in the US."

Just this week, a report in Salon described a return to the country by two self-described "white American citizens," who were grilled by a border agent. The citizens claimed the agent "railed against liberals, whom the agent accused of trying to undermine our president and who beat up his supporters without any reason; an activist liberal professor who failed his kid over a pro-Trump essay; and an entire religion, Islam, which he said is dedicated to killing those who uphold Western society," wrote Jonathan Meador in Salon.

Elaassal won't be able to give his talk, which was set for July 26 but has since been cancelled.

America's loss.