JERUSALEM - Israeli security officials at Ben Gurion airport are legally allowed to demand access to tourists' email accounts and deny them entry if they refuse, the country's top legal official said on Wednesday.

Details of the policy were laid out by Attorney General Yehuda Weinstein in a written response to the Association for Civil Rights in Israel (ACRI), the group said in a statement.

In June 2012, ACRI's Lila Margalit wrote to the attorney general demanding clarification following media reports about security officials demanding access to tourists' email accounts before allowing them into the country.

"In a response dated April 24, 2013, the attorney general's office confirmed this practice," ACRI said, quoting sections of the document which said it was only done in exceptional cases where "relevant suspicious signs" were evident and only done with the tourist's "consent".

Related Reading: Privacy Statements - Where Size Matters

"However, the attorney general's office also noted that while a tourist may refuse such a search, 'it will be made clear to him that his refusal will be taken into consideration along with other relevant factors, in deciding whether to allow him entry to Israel'," it continued.

ACRI slammed the policy as a "drastic invasion of privacy" heaping scorn on the idea a tourist could freely give their consent while facing the threat of possible deportation if they refused.

"A tourist who has just spent thousands of dollars to travel to Israel, only to be interrogated at the airport by Shin Bet (domestic security) agents and told to grant access to their email account, is in no position to give free and informed consent," Margalit said.

"Such 'consent' -- given under threat of deportation -- cannot serve as a basis for such a drastic invasion of privacy," she said.

"Allowing security agents to take such invasive measures at their own discretion and on the basis of such flimsy 'consent' is not befitting of a democracy."

Related: Anonymous Attacks Israel, but Damage 'Minimal'

Related: Privacy - Why Europeans Think You're Inadequate