LINCOLN, Neb. -- A judge has dismissed a Nebraska inmate's lawsuit that claimed he was denied his right to worship the divine Flying Spaghetti Monster, and that he was mocked and faced discrimination for his faith.

Stephen Cavanaugh sued the Department of Correctional Services and penitentiary officials in 2014 seeking $5 million and a court order mandating that inmates who practice FSMism receive the same rights and privileges as inmates who practice other religions.

U.S. District Judge John Gerrard dismissed the lawsuit on Tuesday. He said in his ruling that "FSMism" is not a religion as outlined by federal law, but "a parody intended to advance an argument about science, the evolution of life and the place of religion in public education."

Gerrard said those issues are important and that FSMism contains a serious argument, "but that does not mean that the trappings of the satire used to make that argument are entitled to protection as a 'religion,"' the Lincoln Journal Star reported.

He also said Cavanaugh, 24, didn't sufficiently back up claims that he had been prevented from exercising his religion while serving time in the Nebraska State Penitentiary on assault and weapons charges.

Cavanaugh claimed prison staff discriminated against him by refusing to allow him to meet for worship services and classes, to wear religious clothing and pendants and to receive communion. He said staff mocked and insulted his faith.

Gerrard determined that prison staff considered Cavanaugh's request in good faith "and concluded, reasonably, that FSMism was satirical and required no accommodation."

"This case is difficult because FSMism, as a parody, is designed to look very much like a religion," he said.