LONDON — The court that oversees intelligence agencies in Britain ruled on Friday that the electronic mass surveillance of cellphone and other online communications data had been conducted unlawfully.

The legal decision, the first time the court has ruled against the British intelligence services since the tribunal was created in 2000, relates to information that was shared between British security agencies and the National Security Agency of the United States before December 2014.

Although privacy campaigners claimed the decision as a victory, many experts said the British and American intelligence agencies would continue to share information obtained with electronic surveillance, even if they had to slightly alter their techniques to comply with human rights law.

“It’s a real landmark case,” said Ian Brown, a professor of information security and privacy at the University of Oxford. “This will not stop intelligence agencies from sharing information. But it’s unlikely they will be able to conduct large-scale uncontrolled intelligence activities without more oversight.”