Police Commissioner Raymond Kelly marches in the Columbus Day Parade on Oct. 14, 2013. View Full Caption Spencer Platt/Getty Images

NEW YORK CITY — The NYPD’s International Liaison Program that posts detectives in nearly a dozen foreign cities is a waste of money that has not prevented any attacks, say sources who have dealt with the officials overseas.

Former NYPD Commissioner Raymond Kelly systematically began assigning NYPD personnel in foreign port-of-calls — using money from a charity to pay for it — not long after taking office in post-9/11 New York. He was eager to get information quickly and directly from his own personnel rather than rely on the feds.

But former federal officials who served overseas told “On The Inside” the NYPD detectives are ineffective, often angering and confusing the foreign law enforcement officials they are trying to work with, and are usually relegated to the sidelines because they lack national security clearance.

For example, when bombs exploded at resorts in Bali in 2005, killing 20 and injuring hundreds, the Indonesian National Police “were astonished and irritated that the NYPD showed up,” a federal source explained.

That's because those NYPD Intelligence Division detectives were based in Singapore, and were sent into a chaotic terrorism scene where they had no previous relationship with local law enforcement.

And even in Singapore, those detectives had no security clearance and no standing with the Singapore Internal Security Department, which is the agency tasked with combating terrorism. The SISD will not even meet with any U.S. representative, even informally, outside a U.S. embassy.

The detectives were confronted in Bali by the U.S. regional security officer, who is the senior law enforcement representative for the U.S. embassy in Indonesia, sources said. He demanded to know what they were doing there.

They explained that their boss, David Cohen, the NYPD intelligence commissioner and a former CIA official, insisted they go to the bombing scene, sources said.

In the end, a source said, there was “absolutely no nexus” between the bombing and New York. The attack was the work of the Indonesia-based organization Jemaah Islamiyah. And any information obtained by the feds in Bali was transmitted to the Los Angeles and New York FBI offices and to the FBI-NYPD Joint Terrorism Task Force, which has roughly 120 NYPD detectives along with top police brass.

Another source said that NYPD detectives showed up at the funerals of victims of the Madrid rail bombings in 2004, angering local officials and victims' families.

“Ray Kelly and David Cohen created a monster,” the source said. “The NYPD Intelligence Division has absolutely no place in overseas counter-terrorism — lack of security clearances and diplomatic immunity, confusion for host country law enforcement and security services, conflicts with U.S. agencies such as the CIA, FBI, DEA, U.S. Embassy RSO, etc.”

While the program has helped NYPD analysts produce post-attack PowerPoint presentations, even Kelly has acknowledged that the multimillion-dollar program has not thwarted a single attack here.

One of the first decisions Police Commissioner Bill Bratton will have to make is whether to scrap the program, or to adjust it.

At his swearing-in, Bratton praised Kelly for building a first-class counter-terrorism division. But he has not weighed in on keeping the overseas program, although he said he would continue to count on the New York City Police Foundation to fund NYPD projects.

Even a former top federal counter-terrorism official who “fully understands” Kelly’s motives said the International Liaison Program would have to be reconfigured by Bratton and his new counter-terrorism czar, John Miller, if they plan to keep it staffed.

The International Liaison Program was started in 2002 and costs more than $1 million a year. Because room and board and supplies are paid for by the Police Foundation, and not with taxpayer moneys, the initiative has avoided scrutiny from outside authorities, such as the City Council.

The NYPD pays only for the detectives' salaries, which run about $120,000 a year, plus overtime.

A former top police official pointed out that it is not an easy decision to simply shut down the program, considering the continuing global and domestic terror threat with the Big Apple as a key target.

“It has some merits,” an NYPD source said. “But it certainly is an expensive luxury when detective squads here could use more personnel."

UPDATE

At an unrelated press conference Tuesday afternoon, Commissioner Bill Bratton said he could not "speak with any specificity to that program which is funded by the police foundation."

He said he "understands Commissioner Kelly was very strongly supportive of it" and "I’ve heard nothing negative about it, quite frankly.”

But he pointed out that he will be "taking a look at various operations in the department (and) a comprehensive look at what the department has been doing."