Updated

New York's police commissioner confirmed Thursday that a CIA officer is working out of police headquarters there, after an Associated Press investigation revealed an unusual partnership with the CIA that has blurred the line between foreign and domestic spying. But he and the CIA said the spy agency's role at the department is an advisory one.

Speaking to reporters in New York, commissioner Raymond Kelly acknowledged that the CIA trains NYPD officers on "trade craft issues," meaning espionage techniques, and advises police about events happening overseas. Kelly also said he was unaware of any other U.S. police department with a similar relationship with the CIA.

"They are involved in providing us with information, usually coming from perhaps overseas and providing it to us for, you know, just for our purposes," Kelly said.

CIA spokeswoman Jennifer Youngblood said the agency does not spy inside the United States and also described the relationship with the CIA as collaborative.

"Our cooperation, in coordination with the Federal Bureau of Investigation, is exactly what the American people deserve and have come to expect following 9/11," she said.

More On This...

A months-long investigation by the AP, published Wednesday, revealed that the NYPD has dispatched teams of undercover officers, known as "rakers," into minority neighborhoods as part of a human mapping program, according to officials directly involved in the program. They've monitored daily life in bookstores, bars, cafes and nightclubs. Police have also used informants, known as "mosque crawlers," to monitor sermons, even when there's no evidence of wrongdoing. NYPD officials have scrutinized imams and gathered intelligence on cab drivers and food cart vendors, jobs often done by Muslims.

Many of the operations were built with help from the CIA, which is prohibited from spying on Americans but was instrumental in transforming the NYPD's intelligence unit after the September 2001 terror attacks.

The NYPD denied that it trolls ethnic neighborhoods and said it only follows leads. The mayor on Thursday defended the police department's efforts.

"In the end the NYPD's first job is prevention, and I think they've done a very good job of that," New York City Mayor Michael Bloomberg said when asked about the police practices. "The law is pretty clear about what's the requirement, and I think they've followed the law."

The disclosures about the NYPD's activities provoked exasperation in the city's Muslim neighborhoods, where government officials have sought to build relationships in Muslim communities and pledged to ensure that Muslims aren't targeted for discrimination.

"The NYPD's credibility is bankrupt in our communities," Fahd Ahmed, legal and policy director of the Desis Rising Up & Moving group, said in a statement Thursday. "We need accountability, transparency and an overhaul of tactics and policies."

Government outreach programs have operated in Boston, Cleveland, Detroit, Minneapolis, Portland, Ore., and Washington -- all cities with large Muslim communities -- even as law enforcement around the country has stepped up investigative efforts to stave off attacks.

But the inherent tensions caused by this duality of missions is perhaps most visible in New York. It is the only U.S. city that al-Qaeda has successfully attacked twice and continues to be the target of terror plots. New York also is home to the country's most aggressive local police department investigating counterterrorism.

"It seems to many of the leadership here, there are two kinds of authorities they are playing -- one is in the forefront which is very cooperative," said Zaheer Uddin of the Islamic Leadership Council of New York. "And there is another authority, which is playing against Islam and Muslims, going against the First Amendment and the security of this country."

Uddin asked, "Are we partners, or are we a suspicious community?"

On Wednesday, the Justice Department said it will review a request by a Muslim advocacy group to investigate.

"These revelations send the message to American Muslims that they are being viewed as a suspect community and that their constitutional rights may be violated with impunity," said Ibrahim Hooper, spokesman for the Council on American-Islamic Relations, which asked for the investigation. "The Justice Department must initiate an immediate investigation of the civil rights implications of this spy program and the legality of its links to the CIA."

In the decade since the September 2001 attacks, government officials in New York also have met with Muslim leaders and exchanged cellphone numbers. They've attended religious services, dinners and teas, and spoken at community meetings. The FBI recently hosted an event for 500 young Muslims in Brooklyn to build trust and get to know federal law enforcement, with a bomb-sniffing dog, scuba boat and helicopter on display.

"I go and visit mosques on a regular basis," Kelly previously told the AP, adding that he also holds question-and-answer sessions and planned to attend several dinners with members of the Muslim community during the holy month of Ramadan this year.

The police department in 2006 hired Sidique Wai, an African immigrant and member of the New York Muslim community, to coordinate the NYPD's citywide community outreach program. He said the interaction and outreach between the community and police is unprecedented.

"The majority of the faith-based -- particularly the Muslim leaders throughout the city -- are absolutely appreciative of the unprecedented relationship with the police department," Wai said. "I'm not aware of a deliberate effort on the part of NYPD to profile people."

Some Muslim community leaders in New York aren't satisfied. They have complained about aggressive tactics the department uses to collect intelligence and about a video, "The Third Jihad," shown earlier this year to some members of the NYPD during a training session. Kelly, the police commissioner, explained in a letter in March that the film was not part of the department's training program and said it was shown in the background while members of the NYPD were filling out administrative paperwork before a training session.

The video includes images of terror attacks, Usama bin Laden and U.S. Muslim leaders praising the 2001 hijackers, news reports about terror plots and experts talking about the threat of radical Islam. Muslim leaders were outraged by the film because they said it was anti-Islam.

Wai said these issues have been raised and addressed at the many forums held throughout the Muslim community. He said people ask about profiling, and they get answers. "They may not be the answers that they want to hear," he said.

Not all New York Muslim leaders are complaining.

"There was a time when police would rush into the mosque with their boots on," Mustapha Senghor, chairman of the Harlem Islamic Cultural Center, said during a July pre-Ramadan conference in New York. "They do not do that anymore. Congratulations, commissioner. For that we thank you, very much."

"We love you, commissioner," Senghor said. "You have imams who are extensions of the police force. You include us, you talk to us, you ask us what we are feeling. It makes us feel we are part of the city, and not that people are against us."