BOSTON (AP) -- Former Boston mobster James "Whitey" Bulger will take the stand in his own defense when he goes on trial next year on charges that he participated in 19 murders, testifying about his claim that he was given immunity, his attorney said Monday.

Attorney J.W. Carney Jr. said in court that Bulger will testify about his claim that he was given immunity for any crimes he committed while he was a top-echelon FBI informant against the Mafia.

"James Bulger will testify at this trial and he will present evidence, corroborated by others, that he received immunity from the Department of Justice," Carney said.

Carney had said he planned to file a motion to dismiss the charges against Bulger based on his immunity claim. But he said he no longer plans to file such a motion because Bulger believes he can get a fairer hearing from a jury on the immunity claim than he can from the judge who is to preside at his trial.

Carney had unsuccessfully tried to have U.S. District Court Judge Richard Stearns recused from the March 2013 trial because Stearns was a top federal prosecutor in the 1980s, when Bulger allegedly was committing crimes with impunity while also acting as an informant. The defense has said Stearns -- who was head of the U.S. attorney's criminal division during part of the '80s -- would try to shield his former colleagues and could not be impartial.

Stearns has said he would not step down. In a written order last month, he said he had no doubt about his ability to remain impartial, noting he was never involved in the prosecution of a case in which Bulger was a subject or target.

Bulger, the former leader of the notorious Winter Hill Gang, fled Boston in 1994 after receiving a warning through his former FBI handler that he was about to be indicted.

Bulger, now 82, was captured last year in Santa Monica, Calif., after 16 years on the run.

Carney said in court that it was not the FBI who gave Bulger immunity, but he would not identify who within the Department of Justice allegedly made him such a promise.

Former Boston FBI Agent John Connolly Jr. was convicted of racketeering in 2002 for allegedly providing the tip that prompted Bulger to flee. The corrupt relationship between Bulger and the FBI was an embarrassment for the agency and led some critics to charge that the FBI didn't try hard to find Bulger while he was a fugitive. The FBI has vehemently denied that.

Carney told reporters that Bulger "is going to tell the truth ... about why he was able to spend 30 years allegedly committing a whole host of crimes" and was not prosecuted for any of them until the 1990s.

"You will hear James Bulger testify about everything," he said.

Prosecutors have called Bulger's immunity claim "frivolous and unsubstantiated."

During the hearing, Carney sparred with Assistant U.S. Attorney Fred Wyshak Jr. over the pace at which prosecutors have been turning over evidence in the case.

Carney said prosecutors have turned over 32,000 pages of documents during the last month, materials he claimed could have been provided to the defense a year ago, right after Bulger was arrested. In total, the government has turned over approximately 350,000 pages of discovery.

Magistrate Judge Marianne Bowler said she was satisfied that the government is working "in a speedy and expedient fashion" to produce the discovery materials.

Carney also said he is being hampered in his defense of Bulger by the government's request to keep most of the discovery materials sealed so that only members of the defense can see it.

Carney said the current protective order prohibits him from sharing the documents with third parties such as outside attorneys or focus groups who could help him develop trial strategy.

"After 20 years, the government is still trying to hide the evidence," Carney said.

Wyshak accused Carney of "grandstanding," saying prosecutors have gone above and beyond what they are required to do.