A Muslim woman will be allowed to stand trial while wearing a full-face veil but must remove it while giving evidence, a judge has ruled.

Lawyers for the woman, who cannot be identified for legal reasons, had argued that it would breach her human rights and be counter to Britain's tolerance of Islamic dress to remove her niqab against her wishes.

But Judge Peter Murphy, sitting at London's Blackfriars Crown Court, said: "In general, the defendant is free to wear the niqab during trial. If the defendant gives evidence she must remove the niqab throughout her evidence. The court may use its inherent powers to do what it can to alleviate any discomfort, for example by allowing the use of screens or allowing her to give evidence by live link."

The 22-year-old from London, who said it is against her religious beliefs to show her face in public, entered a not guilty plea to a charge of intimidation last week while wearing a niqab after the judge backed down from a previous decision that she would have to show her face to be properly identified.

Making his final judgment on Monday, the judge said: "The ability of the jury to see the defendant for the purposes of evaluating her evidence is crucial."

Referring to the woman as "D", the judge said she had only worn the veil since May 2012 but his decision would have been the same if she had worn it for years. He went on: "I accept for the purposes of this judgment that D sincerely takes the view that as a Muslim woman, she is either not permitted or chooses not to uncover her face in the presence of men who are not members of her close family. I have been given no reason to doubt the sincerity of her belief."

The judge said he "expresses the hope that Parliament or a higher court will provide a definite answer" to the issue soon, adding: "The niqab has become the elephant in the court room."

Keith Porteous Wood, executive director of the National Secular Society, condemned the ruling. He said: "It is vital that defendants' faces are visible at all times, including while others are giving evidence, so we regret the judge's decision not to require this. We will be complaining to the Office of Judicial Complaints and also be asking senior legal officers to make visibility throughout court hearings mandatory, and not subject to judges' discretion."

Judge Murphy said that when the woman is asked to take off the niqab ahead of giving evidence, she should be given some time to reflect beforehand. "If she refuses, the judge should not allow her to give evidence and must give the jury a clear direction," he said. She must also remove it in front of a female police officer or other witness for the purposes of identification, as she has done so in previous hearings. Although a screen will be offered to shield her from public view, she must still be seen by the judge, jury and legal counsel, although she also has the option to give evidence over a live TV link.

The judge said it was necessary for a democratic society to restrict the rights of a defendant to wear a niqab during court proceedings. He said: "Balancing the right of religious manifestation against the rights and freedoms of the public, the press and other interested parties such as the complainant in the proper administration of justice, the latter must prevail over D's right to manifest her religion or belief during the proceedings against her to the extent necessary in the interests of justice. No tradition or practice, whether religious or otherwise, can claim to occupy such a privileged position that the rule of law, open justice and the adversarial trial process are sacrificed to accommodate it. That is not a discrimination against religion, it is a matter of upholding the rule of law in a democratic society." The woman sat listening to the 90-minute judgment from the dock wearing the burka and niqab, with only her eyes visible.