Bikkannavar said he was pressured by Customs and Border Patrol (CBP) agents to hand over his phone and access the pin, despite his attempts to explain he was obliged to not share information on his JPL-issued device, which contained sensitive material. The Nasa scientist also said he is enrolled in the Global Entry programme, which allows individuals who have undergone thorough background checks to have expedited entry into the US.

Bikkannavar was reportedly travelling back from South America, where he spent the last few weeks of January on a personal trip, pursuing his hobby of racing solar-powered cars. The Nasa scientist said he was detained after his passport was scanned and was later escorted to a back room, where five other travellers were asleep on cots, by a CBP agent.

Bikkannavar said he was asked to hand over his phone and pin number, despite him showing the agent the JPL barcode on the device and his assertions that he was not allowed to share information within the device.

"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," Bikkannavar told the Verge. "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."

"I asked a question, 'Why was I chosen?' And he wouldn't tell me," he says.

"I don't know what to think about this," Bikkannavar said. "I was caught a little off guard by the whole thing."

Bikkannavar said he has since handed his phone over to the JPL IT department and informed his superiors about what happened. He claimed that the JPL's cybersecurity team was not happy about the breach.

The travel ban imposed by President Donald Trump, which a federal court recently refused to reinstate, saw numerous visitors to the US being demanded to hand over their phones and social media account details. However, according to Hassan Shibly, chief executive director of Council on American-Islamic Relations (CAIR), Florida, travellers are not legally required to unlock their phones, although refusing to cooperate with CBP agents on the matter could lead to individuals being held for significant periods of time.

"In each incident that I've seen, the subjects have been shown a Blue Paper that says CBP has legal authority to search phones at the border, which gives them the impression that they're obligated to unlock the phone, which isn't true," Shibly said. "They're not obligated to unlock the phone."

Bikkannavar posted an update on Facebook about the incident, which has reportedly been shared over 4,000 times. In the update he said that JPL has issued him a new phone and a new number.

"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 told the Verge. "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.

"Sometimes I get stopped and searched, but never anything like this. Maybe you could say it was one huge coincidence that this thing happens right at the travel ban."