By Jeremy Pelofsky

WASHINGTON (Reuters) - A leading U.S. civil liberties group on Thursday accused the Federal Bureau of Investigation of engaging in unconstitutional racial profiling of Muslims and other minorities, citing internal documents.

The American Civil Liberties Union said memoranda it received under Freedom of Information requests and lawsuits showed the FBI was associating criminal acts with racial and ethnic groups and then using census data and other information to profile entire communities.

The group pointed to 2009 memos from FBI offices in Detroit, Atlanta and San Francisco, among others, that discussed potential criminal activities in Muslim, black and Asian communities, respectively.

The ACLU accused the FBI of exploiting a loophole in federal guidelines issued by its parent organization, the U.S. Justice Department, meant to limit such targeting to terrorism and border security investigations.

"Basing criminal and national security investigations on unlawful profiling is not just unconstitutional, it's ineffective because it produces flawed intelligence," said Hina Shamsi, ACLU's National Security Project director.

"It's counterproductive because it alienates local communities from their governments and ... sends the message that the government views prejudice as acceptable," she said.

The FBI said in a statement that it does use mapping technology and other existing government data to locate and better understand communities that could be targets of threats, but investigations cannot be initiated solely on the basis of race, ethnicity or the exercise of freedom of religion.

"The relevance of mapping ethnic or racial information to any given investigation must be clearly demonstrated and documented," FBI spokesman Michael Kortan said in a statement. Such mapping reports are supposed to address "specific threats, not particular communities," he said.

The FBI has been under fire for some of its training for dealing with religious groups and some of its tactics for investigating terrorism cases, which has included undercover operations to thwart terrorism plots.

FBI Director Robert Mueller ordered a top-to-bottom review of its counterterrorism training after allegations by religious groups that some FBI material said that the more religious Muslims became, the more violent they were.

"We have an obligation to try to identify future threats to the United States. And it should not be based on religion. It should not be based on religious characteristics," Mueller said earlier this month at a congressional hearing.

"But nonetheless, we have an obligation to identify those particular characteristics that might give us a warning as to a person who will undertake an attack against the United States," he told lawmakers.

The ACLU called on Attorney General Eric Holder to ban any racial and ethnic profiling in investigations by the FBI and tighten rules for initiating preliminary investigations. The group has sought any additional memos about racial profiling.

(Reporting by Jeremy Pelofsky in Washington, editing by Kevin Drawbaugh and Todd Eastham)