A US-born NASA scientist says he was detained by US border police, until he agreed to unlock his phone and let the agent copy or examine the phone's contents. The phone was NASA property, but the US Customs and Border Protection—another wing of the federal US government—seemingly didn't care.

Sidd Bikkannavar, who works on tech at the NASA Jet Propulsion Lab that is used by the James Webb Telescope, flew out to Chile on January 15 to race solar-powered cars in Patagonia. On January 30, and following a change of US government administration, Bikkannavar says he was detained by border police in Houston after they scanned his passport. He was ushered off to a waiting room, where about five other travellers were waiting to be processed.

Eventually, the NASA scientist was seated in an interview room with a CBP officer who quizzed him on the usual stuff: where he had been, where he was going to, his job title, etc. It all seemed a bit odd, according to Bikkannavar, because he's enrolled in the Global Entry scheme, and thus they already knew everything about him. “I asked a question, ‘Why was I chosen?’ And he wouldn’t tell me,” Bikkannavar said, as reported by The Verge.

The officer also showed Bikkannavar a document—Inspection of Electronic Devices—that gives the CBP authority to search devices at the border. “I was cautiously telling him I wasn’t allowed to [hand over the NASA-owned device], because I didn’t want to seem like I was not cooperating,” said Bikkannavar. “I told him I’m not really allowed to give the passcode; I have to protect access. But he insisted they had the authority to search it.”

While the CBP does have authority to search devices, you aren't obligated to unlock your device. The problem is, if you don't unlock your device, you could be detained for a longer period of time. “I didn’t really want to explore all those consequences,” Bikkannavar said. He handed over the device and its PIN, and then the officer took the device away for 30 minutes.

Bikkannavar said he doesn't know what happened during those 30 minutes, though he told The Verge that "the cybersecurity team at JPL was not happy about the breach."

this is from an IRL friend of mine. this is NOT my america. EVER. #MuslimBan Siid is a US Citizen. @CustomsBorder u say "Welcome Home" #NASA pic.twitter.com/W4UtF88rJy — Nick Adkins (@nickisnpdx) 6 February 2017

Clearly, Bikkannavar was a bit spooked by the whole ordeal. “It was not that they were concerned with me bringing something dangerous in, because they didn’t even touch the bags. They had no way of knowing I could have had something in there,” he said. “You can say, ‘Okay well maybe it’s about making sure I’m not a dangerous person,’ but they have all the information to verify that.”

Bikkannavar mused that it might be his foreign-sounding name that set off alarm bells, or maybe it was just a very poorly timed coincidence that it occurred three days after the Trump travel ban was enacted.

Last week, the new US Department of Homeland Security chief, John Kelly, said that some US visitors from seven Muslim-majority countries may soon have to provide social media passwords before they can enter the country. Trump's travel ban, however, is currently on hold after a federal appeals court said that unchecked presidential power "runs contrary to the fundamental structure of our constitutional democracy."