A California atheist has won a settlement of nearly $2 million after being sent to jail on a parole violation for objections he made about participating in a faith-based rehab program.

Barry A. Hazle Jr., 46, served time for a conviction of methamphetamine possession in 2007. As a condition of his parole, he was enrolled in a drug treatment program where participants were required to acknowledge a "higher power," according to the Sacramento Bee.

Hazle complained and asked for a different treatment program, but was told the only option in his area was the faith-based, Westcare 12-step program, according to the Record Searchlight.

Hazle was sent back to jail for more than three months for allegedly being “disruptive, though in a congenial way, to the staff as well as other students" and being "sort of passive-aggressive,” the paper reported.

"I’m thrilled to finally have this case settled," Hazle told the Searchlight. "It sends a clear message to people in a position of authority, like my parole agent, for example, that they not mandate religious programming for their parolees, and for anyone else, for that matter."

Hazle sued in 2008 and won, but a jury refused to award him any damages. The 9th U.S. Circuit Court of Appeals then threw out the decision. In a unanimous ruling, the three-judge panel said Hazle was entitled to compensation.

“The jury’s verdict, which awarded Hazle no compensatory damages at all for his loss of liberty, cannot be upheld,” Judge Stephen Reinhardt wrote in the court’s opinion. “The jury simply was not entitled to refuse to award any damages for Hazle’s undisputable -- and undisputed -- loss of liberty, and its verdict to the contrary must be rejected.”

The state of California will pay Hazle $1 million, while Westcare will pay $925,000 under terms of the settlement, according to KRCR-TV.

Hazle told the Sacramento Bee he plans to become active in local drug rehabilitation efforts.