Inmates at a troubled West Virginia prison where James “Whitey” Bulger was beaten to death found out ahead of time that the notorious Boston gangster would be arriving, according to new details revealed in court.

Sean McKinnon, who is accused of acting as a lookout while two other men killed Bulger, told his mother on a phone call shortly before Bulger came to USP Hazelton in October 2018 that inmates were preparing for the arrival of a “higher profile person.”

After McKinnon told her that it was Bulger, she told him to stay away from the gangster, said Assistant U.S. Attorney Hannah Nowalk, according to a transcript of a hearing Monday in Ocala, Florida.

McKinnon told his mother: “I can’t,” to which she responded: “You get in trouble.”

“Don’t worry. Oh, I don’t plan it,” McKinnon said, according to the prosecutor.

The call was among new information disclosed about the slaying of 89-year-old Bulger during a detention hearing for 36-year-old McKinnon, who is charged with conspiring with two other men — Fotios “Freddy” Geas, 55, and Paul J. DeCologero, 48 — to kill Bulger hours after he arrived at Hazelton from another lockup in Florida.

Bulger’s killing has raised questions about why the known “snitch” was transferred to the troubled prison, known as “Misery Mountain,” and why he was placed in the general population instead of more protective housing.

An attorney for McKinnon, who was Geas’ cellmate, told the judge that the phone call doesn’t show he was involved in any plot to kill Bulger. She said it wasn’t just that McKinnon knew, but “the entire unit was alerted that Whitey Bulger was coming to the unit.”

“The fact that his roommate was a henchman has nothing to do with him. He didn’t select his roommate. The fact that he knew that doesn’t really tell the Court that he was involved in the conspiracy,” defense attorney Christine Bird said, according to the transcript.

U.S. Magistrate Judge Philip Lammens on Monday ruled that McKinnon should remain locked up until trial, calling him a risk of flight and danger to the community.

Nowalk told the judge that surveillance video shows Geas and DeCologero entering Bulger’s cell around 6 a.m. The footage shows McKinnon sitting at a table that faces Bulger’s cell while the other two men were inside the cell for about seven minutes. Bulger was found dead in his bed about two hours later, Nowalk said, according to the transcript.

An inmate witness told the grand jury in the case that he asked McKinnon and DeCologero if they were the guys who killed Bulger and they said they were, Nowalk said. That same witness “then indicated that Pauly (DeCologero) told him that Bulger was a snitch,” Nowalk said.

DeCologero “said as soon as they saw Bulger come into the unit, they planned to kill him,” Nowalk said. “And then Pauly (DeCologero) told this inmate witness that Sean McKinnon was the lookout,” she said.

An inmate witness will also testify that DeCologero said that he and Geas “used a belt with a lock attached to it” to beat Bulger to death, Nowalk said.

Bulger, who ran the largely Irish mob in Boston in the 1970s and ’80s, served as an FBI informant who ratted on his gang’s main rival, according to the bureau. He later became one of the nation’s most-wanted fugitives.

Bulger strongly denied ever being a government informant. An intake screening form Bulger signed after arriving at Hazelton said he answered “no” when asked if there were any reasons he should be kept out of the general population and if he ever assisted law enforcement in any way.

There is no attorney listed in the Bulger case yet for DeCologero, who has since been moved from Hazelton to another federal prison facility.

DeCologero, who was in an organized crime gang led by his uncle in Massachusetts, was convicted of buying heroin that was used to try to kill a teenage girl his uncle wanted dead because he feared she would betray the crew to police. The heroin didn’t kill her, so another man broke her neck, dismembered her and buried her remains in the woods, court records say.

Geas, a Mafia hitman, remains at Hazelton. He and his brother were sentenced to life in prison in 2011 for their roles in several violent crimes, including the 2003 killing of Adolfo “Big Al” Bruno, a Genovese crime family boss in Springfield, Massachusetts. Geas remains in prison at Hazelton.

McKinnon had been on supervised release when he was arrested last week in Florida on charges including conspiracy to commit first degree murder. He is also charged separately with making false statements to a federal agent. Prosecutors say he told federal agents he wasn’t aware of what happened to Bulger.

McKinnon pleaded guilty in 2015 to stealing a dozen handguns from a Vermont firearms dealer. He was moved to a halfway house in February before being released from there in July.