A federal judge has dismissed a lawsuit filed by family members of Boston crime boss James “Whitey” Bulger Jr., who was beaten to death in a federal prison in West Virginia.

U.S. District Judge John Preston Bailey granted the government’s motion to dismiss the lawsuit.

The judge ruled federal law precludes the family’s ability to sue over a decision to transfer Bulger to the prison at Hazelton.

The family accused the Bureau of Prisons and multiple prison system employees of failing to protect Bulger.

Bulger was 89 when he was killed in 2018 on the same day he was transferred from another prison