An FBI informant who infiltrated a California mosque violated the constitutional rights of hundreds of Muslims by targeting them for surveillance because of their religion, the ACLU and a Muslim group said in a lawsuit Tuesday.

The lawsuit, filed against the FBI and seven of its agents and supervisors, focuses on the actions several years ago of Craig Monteilh, a paid FBI informant. Monteilh has said he was instructed to spy on worshipers at an Irvine mosque in a quest for potential terrorists, allegations that prompted fierce criticism of the FBI from some Muslims in Southern California and nationwide.

The lawsuit alleges that Monteilh was ordered by his FBI handlers to conduct "indiscriminate surveillance" of Muslims, violating their First Amendment right to freedom of religion. Filed on behalf of three Muslim plaintiffs, the 64-page document seeks class action status, unspecified damages and a court order instructing the FBI to destroy or return the information Monteilh collected.

"The FBI should be spending its time and resources investigating actual threats, not spying on every American who happens to worship at a mosque,'' said Peter Bibring, a staff attorney for the ACLU of Southern California, which filed the complaint along with the Los Angeles office of the Council on American-Islamic Relations.

FBI officials declined to comment on the lawsuit, filed in U.S. District Court in Los Angeles, but empasized that they are careful not to violate civil liberties when they use informants and do not target anyone based on religion or ethnicity.

The lawsuit comes after years of national debate over how the FBI can stop terrorism while preserving civil liberties. The FBI says it has been successful in striking that balance.

FBI and Justice Department officials say that they have gone to great lengths to maintain good relations with Muslims and that the Monteilh case is not representative of those efforts. Some Muslims say the revelations about Monteilh have seriously damaged their relationship with the FBI.

Monteilh, who had served time in jail after being convicted of forgery, revealed his informant status in 2009, and law enforcement sources have confirmed that he was a paid FBI informant for several years until 2007. They have said he aided an existing investigation and was not told to target Muslims because of their religion.

Legal experts said that point - whether the ACLU can prove that the FBI randomly targeted Muslims - will be key in determining the case's outcome. If the FBI did, "the case has a strong likelihood of success,'' said David Cole, a constitutional law and national security expert at Georgetown University's law school.

John Baker, a professor at Louisiana State University's law school and a former state prosecutor, said the ACLU's case is heavily dependent on Monteilh's word. "Using informants is an unsavory business, and informants often lie,'' he said. "How trustworthy is his information? No one knows.''

Legal experts said that there have been a number of legal challenges to FBI surveillance practices since the 1970s but that the current lawsuit is among the first to accuse the agency of targeting people based on religion.

Monteilh, a Los Angeles native, has said he became an informant for a federal-state task force in 2003 and was later recruited by the FBI for counterterrorism cases. Agents, he said, provided his cover: Farouk al-Aziz, a French Syrian in search of his Islamic roots. His code name was "Oracle."

Monteilh said he was instructed to infiltrate mosques throughout Orange County and two neighboring counties in Southern California but was told to focus on the Islamic Center of Irvine.

Members of that mosque have said Monteilh attended prayers five times a day, and he has said he tape-recorded Muslims at the mosques, in their homes and at a gym. He helped build a terrorism-related case against a mosque member, but the case collapsed.

The lawsuit says that Monteilh's handlers, FBI agents Kevin Armstrong and Paul Allen, instructed him to collect e-mail addresses, phone numbers and other detailed information about Muslims and "explicitly told Monteilh that Islam was a threat to America's national security. ''

Through an FBI spokeswoman, the two agents declined to comment.

Ali Malik, a plaintiff in the lawsuit who helped teach Monteilh about Islam at the Irvine mosque, said the Muslim community has yet to recover from Monteilh's actions.

"A lot of people now see the mosque as a place where the government can just come in and spy on you,'' said Malik, who says he has been questioned by the FBI several times since his dealings with Monteilh. "It's going to take a long time to heal those wounds.''