An Indiana judge dismissed a lawsuit Wednesday brought by the nephew of notorious 1930s gangster John Dillinger, who sought to exhume his remains to prove someone else is buried at the Indianapolis gravesite.

In his ruling, Marion County Superior Court Judge Timothy Oakes said Michael Thompson must get consent from Crown Hill Cemetery to dig up the remains.

“The limited question before the Court today is whether disinterment may occur under this section of the statute without cemetery approval," Oakes wrote. "Court finds that the statutory requirements for this section of the statute are clear in that disinterment requires the cemetery owner to give consent before disinterment may occur."

Thompson sued the cemetery in August after it refused to let him exhume the grave as part of a History Channel documentary. The channel has since pulled out of the project.

"It is my belief and opinion that it is critical to learn whether Dillinger lived beyond his reported date of death of July 22, 1934," Thompson said in the affidavit, according to the Indianapolis Star. "If he was not killed on that date, I am interested in discovering what happened to him, where he lived, whether he had children, and whether any such children or grandchildren are living today."

GANGSTER JOHN DILLINGER'S BODY REPORTEDLY TO BE EXHUMED FROM HEAVILY PROTECTED GRAVE

Thompson said he has evidence that the Great Depression gangster is not buried at Crown Hill and that he may not have been the man killed by FBI agents outside a Chicago movie theater.

Attorneys for the cemetery said state law gives cemetery owners the right to “protect its gravesites from unwarranted disturbance.” They also said any notion that Dillinger wasn't killed outside the theater is a "decades-old conspiracy theory."

“His close family believed it was him and they wanted him in the family plot,” said Alice McKenzie Morical, an attorney for Crown Hill Cemetery’s management company.

Oakes said he didn't buy the cemetery's argument that an exhumation would be disruptive, but noted that state law doesn't require the reason to be rational. He dismissed the case without prejudice, meaning Thompson’s attorney can amend the complaint and cite a different statute.

Dillinger became famous after committing a string of bank robberies and escaping law enforcement several times.

The FBI said he was buried in Indiana after the fatal shooting. Thompson's attorney, Andrea Simmons, said her client has a large number of files that raise questions about whether Dillinger is really buried at the site.

“There is strong reason to believe that he’s not the person in the grave,” she said.

The FBI has said a "wealth" of information, including fingerprint matches, supports its story.

Some of Dillinger's other family members objected to Thompson's plan.

“This should never have gotten this far. I think it’s very disgraceful to the family, everything to do with it,” Stephanie Samuels, the gangster's great-great niece, said after the hearing. “And there is very much family against this.”

Following his death, Dillinger's father had his casket covered in concrete and topped by four reinforced concrete slabs to prevent vandals from digging him up, according to the Indiana Historical Society.

CLICK HERE TO GET THE FOX NEWS APP

Dillinger was one of several high-profile criminals who became the face of the depression-era outlaw. Others included Ma Barker, Arthur "Pretty Boy" Floyd, George "Baby Face" Nelson and Bonnie Parker and Clyde Barrow, who formed the notorious duo Bonnie and Clyde.

The Associated Press contributed to this report.