The FBI last week removed two Suffolk County police detectives assigned to the bureau’s joint Long Island Gang Task Force by James Burke, the former chief of department jailed on charges he beat up a suspect and covered it up, sources said.

Federal prosecutors had asserted, in a successful request that Burke be held until trial as a danger to the community, that he ordered the two detectives to spy on federal prosecutors and FBI agents who might be investigating him.

According to sources, federal investigators were suspicious of any appointments to the task force made by Burke and kept the detectives sealed off from contact with sensitive information about Burke’s case or others in Suffolk law enforcement, sources said.

The sources said there was no indication that the detectives tried to gain any information that Burke or his associates had requested. “They are good guys, but they were put in an impossible situation,” said one source familiar with the situation.

The detectives were told they could not go to the U.S. attorney’s office at the federal courthouse in Central Islip, sources said, for fear they might encounter cooperating police officers, defense attorneys and other witnesses being questioned or subpoenaed as part of the Burke investigation.

The two also were not granted security clearances that would have given them access to sensitive investigative files, either on paper or in the computer system, the sources said.

advertisement | advertise on newsday

At the FBI Long Island office in Melville they were assigned to cases and seated in an area where they were unlikely to come across information about the ongoing investigation into the Suffolk police department, the sources said.

“SCPD officers assigned to a joint state-federal task force on Long Island were ordered by Burke to report back to him in the event they observed certain witnesses meeting with federal agents or prosecutors at the FBI offices or the United States Courthouse in Central Islip,” Eastern District federal prosecutors James Miskiewicz and Lara Treinis Gatz wrote in the letter that resulted in Burke being jailed, pending trial.

Sources said the two detectives are Brian Keegan and Markus Rivera. They could not be reached Monday.

The mere fact that Burke had selected the two detectives to the task force with the potential for revealing inside information to him had a chilling effect on some who were being questioned by federal investigators.

In addition, Miskiewicz and Gatz wrote that a Burke confidant, described only as an unnamed police union official, “has admitted that he told several SCPD personnel that superiors, including Burke, had secretly obtained copies of FBI memorandums of witnesses in the federal investigation, and ominously suggested it would soon be known who was ‘talking’ to federal law enforcement.”

“That same union official then said that the claimed acquisition of FBI reports was false,” Miskiewicz and Gatz wrote. “Nevertheless, witnesses were terrified upon hearing the claim that Burke and others had access to federal investigative materials. Upon hearing the claim, one SCPD witness told a federal agent that if the claim were true, ‘I’m a dead man.’ ”

The Suffolk police plan to reassign the two to regular detective positions and they will not be penalized, the sources said. In addition, the Suffolk police department hopes to get other detectives back into the task force, the sources said.

While initially not commenting on the situation, deputy police commissioner Timothy Sini, who has been proposed as the next police commissioner, said Monday that rejoining the federal effort against crime on Long Island is “one of our top priorities.”

But hours later, Sini added that he and other police officials met with federal officials before Burke’s arrest and agreed that the two detectives should be removed from the task force because Burke had appointed them.

Nellin McIntosh, a spokeswoman for federal prosecutors in the Eastern District, declined to comment.

advertisement | advertise on newsday

Burke said he would assign two detectives to the gang task force a year after he and the county government in 2012 had created a firestorm by removing three other detectives from working with federal investigators, two of them on the gang task force. Sources said that Burke considered the three disloyal to him and also did not want to share credit with investigations with the federal government,

County officials said at that time they supported the removal of the three detectives because they were trying a more community-based approach to fighting gangs.