NEW YORK (AP) — As the New York Police Department broadens its mission and expands its territory beyond New York, it increasingly finds itself at odds with the FBI — often with real consequences to security.The two agencies have had a well-publicized rift that has only widened lately with revelations that the NYPD was spying on Muslims outside its jurisdiction and without the FBI's knowledge.The result of this rift is that the two agencies are at times working at cross-purposes. Documents show the NYPD, for instance, has entered into the clandestine world of foreign counterintelligence without telling the FBI.Publicly, the NYPD and FBI say they have strong relationships. But documents and interviews show that disputes between the agencies have at times quietly put information-sharing on hold and jeopardized investigations.