After about 40 minutes, Bikkannavar was called up. He was led to a small door labeled “Interview Room,” and seated across from a border agent, who said he needed to search Bikkannavar’s things.

Bikkannavar asked why he was singled out for questioning, but the agent wouldn’t tell him. There can't have been any suspicion about his identity, Bikkannavar thought: Not only was he a member of Global Entry—a program that requires applicants to submit to an extensive background check and fingerprinting—but his work at NASA requires him to be vetted regularly by the federal government. He was, he thought, a particularly known entity.

“I’m always super cooperative about this stuff. This isn’t a story about me being super offended and being inconvenienced,” Bikkannavar told me. “I get it. I was with them up to this point.”

But the agent never touched Bikkannavar’s bag—instead, he asked for his smartphone. Bikkannavar handed it over, assuming the agent might just want to inspect it to make sure it wasn’t something more dangerous in disguise. The agent turned it over in his hand and asked for the passcode.

Bikkannavar was taken aback. The phone was Jet Propulsion Lab property, he explained, pointing out the barcode stuck to the back. It was his duty to protect its sensitive contents, and he couldn’t give out the passcode.

The border agent wouldn’t relent. He needed to access the device, he said, and had the authority to do so. He’d handed Bikkannavar a document titled “Inspection of Electronic Devices” when they first sat down, and Bikkannavar gave it a quick scan. The document claimed that CBP had the right to search “all persons, baggage, and merchandise arriving in, or departing from, the United States.” On the backside, in fine print at the bottom, there was a section with the heading, “Consequences of Failure to Provide Information.” The section said that giving up the information is “mandatory” and not cooperating could lead to the “detention and/or seizure” of the electronic device in question.

Bikkannavar didn’t feel like he had a choice. “I’d read the headlines of people being stranded in airports and having problems entering the country, so I was still in the mode of being as cooperative and polite and courteous as possible,” he said to me. Just a few days prior, President Donald Trump had signed an executive order that excluded nationals of seven Muslim-majority countries from entering the U.S. Bikkannavar, a U.S. citizen, would not have been affected by the new policy, which has since been temporarily put on pause by a federal court—but turmoil and confusion at the border had led to many people being improperly detained.

What’s more, he said, he wasn’t sure of his legal rights in that moment. In the CBP interview room, did he still have the Fourth Amendment rights that he’d have if he were stopped by police on the street?