Family members of one of former Boston mob boss James "Whitey" Bulger's murder victims have no right to sue the U.S. government for $9.9 million for failing to let them know he had been buried in an unmarked beachfront grave, a federal judge ruled.

U.S. District Judge Dennis Saylor on Tuesday dismissed a lawsuit filed in June that charged the government had been negligent in taking 26 years to notify the family of rival mobster Paul McGonagle, who Bulger shot in the head in 1974, that McGonagle had been buried at a Boston-area beach.

McGonagle's wife, Mary, and sons Paul and Sean, argued in their suit that the government would have known about the burial because Bulger, now 86, frequently referred to the grave site, including in the presence of corrupt FBI agent John Connolly.

RELATED: Bulger's girlfriend to plead guilty in criminal contempt charge

The family learned of the burial spot after a Bulger associate led police to it in 2000, six years after Bulger had fled Boston.

Saylor wrote that the government would have had no obligation to inform the family of the spot of McGonagle's burial, even if Connolly had been aware of it.

"The issue is not Connolly's moral findings, which appear to have been legion," the judge said. "Rather it is whether a private person in his position, having knowledge of the location of McGonagle's remains, would have had a legal duty to report that fact to his survivors."

Bulger was convicted in 2013 of committing or ordering 11 murders, including McGonagle's, while he ruled Boston's underworld as the head of the Winter Hill crime gang in the 1970s and '80s.

RELATED: 'Black Mass' is more like an outline for a killer 'Whitey' Bulger movie

Bulger fled the city in 1994 after a tip from Connolly that arrest was imminent. He spent 16 years on the run, many atop the FBI's "Most Wanted" list before agents caught up with him in California in 2011. His trial cast a harsh light on the corrupt relationship between the Boston office of the FBI, where agents who shared Bulger's Irish ancestry turned a blind eye to his crimes in exchange for information they could use against the Italian-American Mafia.

Connolly was convicted in 2008 of a role in the murder of a businessman Bulger's gang killed. Connolly, who is serving a 40-year sentence, has long proclaimed his innocence. Bulger is serving life in prison.