By Dustin Volz

WASHINGTON (Reuters) - A U.S. federal judge on Monday for the first time ordered the National Security Agency to cease collecting the phone call records of a lawyer and his firm, providing an unprecedented but narrow and largely symbolic victory to privacy advocates.

Opponents of mass surveillance cheered the ruling by U.S. District Court Judge Richard Leon, who granted an injunction to bar the NSA from collecting the phone metadata of California attorney J.J. Little and his small legal practice.

Unlike previous rulings against the NSA's program to vacuum up Americans' call data, which was exposed publicly by former NSA contractor Edward Snowden in 2013, Leon’s opinion does not grant a stay, meaning it will take effect immediately.

The decision is of little practical consequence because it is so narrow in scope in covering only Little and his firm.

It also comes just weeks before the NSA is scheduled to end its controversial bulk collection program in favor of a more targeted system. That new regime, as mandated by Congress earlier this year, will become active on Nov. 29.

But the ruling's language is forceful and represents a win for civil liberties groups concerned that NSA surveillance is too intrusive.

Leon wrote that the case may be the last court evaluation of the NSA's bulk metadata collection program.

"It will not, however, be the last chapter in the ongoing struggle to balance privacy rights and national security interests under our Constitution in an age of evolving technological wizardry," he wrote.

On Twitter, Snowden cheered the "historic decision" as one that concluded the NSA “violated Americans’ privacy rights.”

Leon, a conservative judge appointed by former President George W. Bush, has long been among the most vocal judges critical of the NSA’s spying practices.

Leon said he did not stay his Monday decision “because it has been almost two years since I first found that the NSA’s bulk telephony metadata program likely violates the Constitution."

Other plaintiffs in the case, including conservative activist Larry Klayman, who began the lawsuit, were not included in the ruling, due to issues concerning standing.

A higher court previously rejected Klayman’s challenge, saying he could not prove his phone was targeted by the NSA as Snowden’s documents only revealed customers of Verizon Business Network Services, which is a subsidiary of Verizon Communications, such as Little, were implicated. Klayman added Little to his case to address the standing concern.