In what is described as a precedent-setting agreement, Memphis officials have signed a court settlement prohibiting police spying on political groups.

Jack Novik, an attorney for the American Civil Liberties Union, said yesterday that the settlement is the first of its kind in the country. The precedent is important, he said, because the ACLU is involved in similar suits in several cities, including Washington, D.C. Chicago, Houston and Detroit, and has been working to get other cities to pass ordinances barring such intelligence-gathering.

In the court settlement, approved Tuesday by U.S. District Court Judge Robert M. McRae Jr. in Memphis, the city denies any illegal activities by its "domestic intelligence unit" in monitoring civil rights activists in the 1960s.

But the city agrees not to engage in any form of political intelligence-gathering in the future. This includes prohibitions against using informers or taking photos or license numbers of participants at public rallies.

To ensure that such surveillance activities aren't shifted to another intelligence unit, the city also agreed to review each criminal investigation that might touch on First Amendment rights, according to the court order.

Arthur J. Shea, deputy city attorney in Memphis said in a telephone interview yesterday that the suit was "a backlash from the '60s . . . We had organizations, we didn't know what they were doing. It was the duty of the police to make sure.

"Hindsight is always 20/20. We can see now there were transgressions, but we were trying to make sure the city didn't burn down more than it did," he said.

"We agreed to do what we've always been doing, following the law."

Novik said he side's demands for money damages were dropped as part of the compromise settlement.

"We hope this amounts to an acknowledgement by the city that it's possible ot have effective enforcement of the criminal laws while avoiding attempted interference with First Amendment activities," Novik said.

The suti was filed two years ago on behalf of politicial activists in Memphis, who asked city police for their files, only to find they had been destroyed hurriedly.

Through depositions over the next several months, however, ACLU attorneys established that domestic intelligence unit informers infiltrated the leadership of many groups. The unit collected material on a range of activities from the Ku Klux Klan to the sanitation workers' strike that took Martin Luther King Jr. to Memphis in 1968, Novik said.