A complaint has been filed in the United States after a worker with tech giant Apple was asked to handover his devices to the US Customs and Border Protection (CBP).
The American Civil Liberties Union (ACLU) said it filed the complaint after Andreas Gal was "subjected to interrogation and retaliation" for questioning the unwarranted search of his electronic devices.
The complaint is seeking an investigation into whether CBP's interrogation and search of Gal was consistent with amendments of the US Constitution, as well as a comprehensive review of its policies.
Gal, a US citizen, has been an outspoken proponent of online privacy and a strong opponent of the Trump administration's policies, the ACLU said.
It said when Gal arrived at San Francisco International Airport on November 29th last year, he was interrogated by three CBP officers who demanded to search his electronic devices.
Gal is bound by non-disclosure agreements and asked to speak to a lawyer before giving officers access to his devices.
The officers repeatedly told him that he had no right to an attorney and threatened him with criminal prosecution, the ACLU has claimed.
After an extended interrogation, Gal was allowed to leave with his devices - but his Global Entry card was taken, and he was told his privileges would be revoked because he refused to comply with the search.
William Freeman is senior counsel with the ACLU in northern California.
He said: "CBP's baseless detention and intrusive interrogation of Andreas Gal and the attempted search of his devices violated his Fourth Amendment rights.
"Furthermore, CBP's policies lack protections for First Amendment rights by allowing interrogation and device searches that may be based on a traveler's political beliefs, activism, nation of origin, or identity."
Technology and civil liberties attorney at the ACLU, Jacob Snow, added: "Digital devices contain huge amounts of personal data about our lives and our work.
"Border Patrol agents should not be able to access this data without a search warrant."