“The FBI won’t look good in this,” a federal prosecutor reflected nearly two years ago. The probe under way against Whitey Bulger, he said, will expose once and for all the bureau’s tangled ties to the powerful gangster.

Today, many in law enforcement believe that the way matters now stand -- Whitey indicted but not apprehended -- plays out favorably for an agency whose past involvement with Bulger has become a public relations nightmare and, worse, poisoned relations with other law enforcement entities.

In this view, the FBI has now won kudos for jumping aboard and contributing to the federal racketeering case hailed for exposing the marriage between Bulger’s Winter Hill Gang and the local Mafia.

But so long as Bulger remains a fugitive, the FBI might be spared the tortuous prospect of facing court scrutiny of its own “marriage” with Bulger -- its controversial use of him as an informant.

But the current “win-win” situation could change suddenly with Bulger’s capture. He could then counterpunch with an immunity defense, lawyers say, arguing that all or part of his alleged criminal activities were protected through his information-trafficking arrangement with the FBI.

It’s a defense that Jackie Presser, the former Teamsters president, used in the mid-1980s. Presser asked a federal judge to dismiss racketeering charges against him, arguing that his illegal activities were sanctioned by the FBI. Prior to a final ruling, Presser died, but not before disclosures that Presser had served as a premier FBI snitch and that agents protected him. Three who handled Presser were investigated for perjury and obstructing justice, with one serving time for contempt.

Parallels between the Presser defense and Bulger’s are not lost on those in local law enforcement who push the notion that an absent Bulger keeps the lid on a possible Pandora’s Box. Said one veteran official about Bulger’s escape: ‘’I know there are individual agents who really wanted to get Whitey, but, institutionally, does the FBI want to get him?”

Bulger’s ties to the FBI date back to the 1960s, according to sources within the FBI. Following Bulger’s release from federal prison for bank robbery, he was handled by agents in the FBI’s organized crime unit, then supervised by Dennis Condon. Condon and his partner, Paul Rico, are best known for converting notorious hitman Joe (The Animal) Barboza into a successful trial witness against the Patriarca crime family in the 1960s.

Cultivating Bulger -- then a foot soldier in the Winter Hill gang -- made sense for a bureau that, by its very nature, is dependent on informants. ‘’Because it doesn’t work in the daily business of law enforcement, the way state and local cops do, the FBI relies almost exclusively on a continuous supply of new informants,” observed one veteran prosecutor.

But by the early 1980s Bulger was a feared and powerful underworld leader in his own right, a status that triggered dissension inside the FBI’s Boston office. “You can never have the top guy,” said one former FBI official familiar with the bureau’s inner workings at the time. “Because you have the top guy, he’s making policy, and then he owns you.”

Relations also began to sour with others in law enforcement, particularly after a series of failures by State Police and federal drug agents to bug Whitey. To be sure, there were some technical troubles, but Bulger showed a disturbing knack for catching wind of the bugs; he’d start talking gibberish or not at all.

Was he tipped off? That was the question that came to preoccupy State Police, beginning in 1980 after a bugging debacle at a garage on Lancaster Street near North Station. Suspicions about Bulger’s ties to the FBI started in earnest, and have not abated since. More bitterness followed quickly in 1981 when State Police discovered a small item tagged onto the state budget in the Legislature that would have forced the early retirements of those who ran the division that had been pursuing the likes of Bulger. It was removed, but the sudden political action, especially with a Senate headed by Bulger’s younger brother, William, fueled the mistrust.

By this time, Bulger’s principal handler was an FBI agent from South Boston named John Connolly, known for his street savvy. Doubts about the bureau’s ties to Bulger heated to the point where, after an internal review, an order was issued to shut Bulger down. But those who saw Bulger as a valuable asset to the organized crime unit, then supervised by agent James Ring, succeeded in scuttling the move.

Following the Globe’s disclosure in 1988 of the FBI’s ties to Bulger, FBI officials have rejected bids to discuss the famous gang leader. But they never flat out deny the Bulger tie.

For his part, Connolly has staked out contradictory positions, privately telling different people different things about Bulger. The retired agent, now director of corporate relations at Boston Edison, has told some that he’s never spoken to Bulger in his life. He’s told others, meanwhile, that Bulger aided him in the FBI’s celebrated takedown of Mafia leader Gennaro Angiulo in the early 1980s. Reached this week, Connolly declined comment.

No one has ever shown the FBI to be an active protector of Bulger -- indeed, such a view is widely condemned as grossly unfair. But the current indictment, which culls past FBI cases against the Mafia for unused material against Bulger, does corroborate the view that the FBI was surely passive during the past decade when it came to stalking Whitey.

The full contours of Bulger’s ties to the FBI will likely remain as elusive as Bulger, so long as he stays on the run.