The Verge has a story about the recent border-crossing experience of a U.S. citizen, Sidd Bikkannavar, who is an employee at NASA’s Jet Propulsion Laboratory. On a return flight from a personal trip to Chile on Jan. 30, Bikkannavar was allegedly detained by employees of the U.S. Customs and Border Patrol (CBP) and “not allowed to leave” until he told CBP the passcode to the government-issued smartphone he used for work that he carried with him.

A few people have sent me the story and wondered whether the government has the authority to do that. The short answer is that they can’t hold a person forever on that basis, but that it’s not entirely clear whether they can detain a person for a few hours based on it. It seems like a somewhat tricky question. Here are a few tentative thoughts on why.

Let’s start with the facts offered in the story:

Bikkannavar says he arrived into Houston early Tuesday morning, and was detained by CBP after his passport was scanned. A CBP officer escorted Bikkannavar to a back room, and told him to wait for additional instructions. . . .

About 40 minutes went by before an officer appeared and called Bikkannavar’s name. “He takes me into an interview room and sort of explains that I’m entering the country and they need to search my possessions to make sure I’m not bringing in anything dangerous,” he says. The CBP officer started asking questions about where Bikkannavar was coming from, where he lives, and his title at work. It’s all information the officer should have had since Bikkannavar is enrolled in Global Entry. “I asked a question, ‘Why was I chosen?’ And he wouldn’t tell me,” he says.

The officer also presented Bikkannavar with a document titled “Inspection of Electronic Devices” and explained that CBP had authority to search his phone. Bikkannavar did not want to hand over the device, because it was given to him by JPL and is technically NASA property. He even showed the officer the JPL barcode on the back of phone. Nonetheless, CBP asked for the phone and the access PIN. “I was cautiously telling him I wasn’t allowed to give it out, because I didn’t want to seem like I was not cooperating,” says 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.” . . . .

Bikkannavar was not allowed to leave until he gave CBP his PIN. The officer insisted that CBP had the authority to search the phone. The document given to Bikkannavar listed a series of consequences for failure to offer information that would allow CBP to copy the contents of the device. “I didn’t really want to explore all those consequences,” he says. “It mentioned detention and seizure.” Ultimately, he agreed to hand over the phone and PIN. The officer left with the device and didn’t return for another 30 minutes.

Was this legal?

First, CBP probably had the authority to search the phone. Courts have disagreed on what the standard is for searching computers at the border. Under some of those cases, the government might have needed reasonable suspicion to conduct a “forensic” search of the phone. CBP may have used a Cellebrite Physical Analyzer to search the phone’s contents, but courts appear to be divided on whether that is a forensic search that requires reasonable suspicion. Compare United States v. Kolsuz, 185 F.Supp.3d 843 (E.D.Va. 2016) (use of Cellebrite Physical Analyzer to search phone’s contents at border requires reasonable suspicion, at least when conducted offsite) with United States v. Lopez, 2016 WL 7370030 (S.D.Cal. 2016) (no reasonable suspicion required, at least when search is conducted onsite).

If reasonable suspicion was required, we don’t know whether the government had it. The story is told from Bikkannavar’s perspective, and it suggests that Bikkannavar has no reason to think there is reasonable suspicion. (“Seemingly, Bikkannavar’s reentry into the country should not have raised any flags.”) But assuming that Bikkannavar is telling the truth, he may not be in a position to know. Reasonable suspicion is a relatively low standard, and it’s always possible that Bikkannavar is completely innocent but that there is reasonable suspicion anyway. Without hearing the government’s side of the story, we can’t say.

Some might focus on the fact that this was a NASA-owned phone. It’s an interesting fact, although it’s not obviously relevant. Maybe Bikkannavar has signed a form limiting or entirely waiving his Fourth Amendment rights in the phone, which could matter under O’Connor v. Ortega, 480 U.S. 709 (1987). A broad waiver of rights in the phone would remove any reasonable-suspicion requirement that might otherwise exist. But we would need to see the form to be sure, as its language might or might not be worded so that it encompasses a border search by CBP.

The more interesting question is whether the government could hold Bikkannavar until he gave up the passcode to the phone. Off the top of my head, I don’t know what the right answer is.

On one hand, the agents couldn’t detain Bikkannavar forever. Detaining a U.S. citizen at the border is a Fourth Amendment seizure, and that seizure can’t be unlimited. See United States v. Martinez-Fuerte, 428 U.S. 543 (1976). On the other hand, courts have allowed border searches of a few hours without reasonable suspicion, including to allow for the search of electronic storage devices. See, e.g., United States v. Feiten, 2016 WL 894452 (E.D.Mich. 2016) (upholding a four-hour delay to search electronic devices).

From that perspective, the delay in this case looks relatively short. If the government could hold Bikkannavar for several hours under the border search exception, one could argue that he was merely being given the option of speeding up the stop by handing over the passcode. Once Bikkannavar gave the agents his passcode, the government didn’t have to try other means to unlock the phone that might have taken more time. And it looks as though they let him go pretty quickly after he told them the passcode.

Maybe that’s right, but I’m not sure. It’s not clear that the agents had the legal authority to compel Bikkannavar to disclose the passcode. Yes, they had the authority to search a phone, but that’s different from having the authority to compel disclosure of the passcode that facilitates the authorized search.

Is there an argument that detaining Bikkannavar until he gave up his right not to hand over the passcode is illegal? It feels almost like an unconstitutional condition, but I don’t quite see it. The agents didn’t force him to give up a constitutional right. The agents aren’t relying on his consent, only the information they need to conduct a border search. I also don’t think there was a Miranda issue, as the cases I have read suggest a secondary inspection at a border checkpoint isn’t “custody” for Miranda purposes. See, e.g., United States v. Butler, 249 F.3d 1094, 1098 (9th Cir. 2001).

Perhaps the argument would be that making him stay in custody unless he disclosed the passcode made the subsequent disclosure involuntary under the Due Process voluntariness cases. Imagine the agents said, “If you want to go home today, tell us your passcode and we’ll release you right away. Otherwise, you’re going to be here awhile.” Does that put so much pressure on a person that it coerces him or her to disclose the passcode? I’m skeptical of that, given the pretty high bar of the voluntariness cases. But it’s an argument.

Anyway, these are just tentative thoughts. If readers have additional ideas, especially ideas based on caselaw rather than instinct, I’d be particularly interested to hear them in the comment thread.