Conservative author and filmmaker Dinesh D’Souza avoided prison on Tuesday when a U.S. judge sentenced him to serve eight months in a community confinement center after he pled guilty to violating campaign finance law.

D’Souza, 53, was ordered by U.S. District Judge Richard Berman in Manhattan to live in the center at the start of a five year probationary period in which he must do one day of community service a week. He must also pay a $30,000 fine and undergo weekly therapy, Berman said.

ADVERTISEMENT

D’Souza, a frequent critic of U.S. President Barack Obama, admitted in May to illegally reimbursing two “straw donors” who donated $10,000 each to the unsuccessful 2012 U.S. Senate campaign in New York of Wendy Long, a Republican he had known since attending Dartmouth College in the early 1980s.

“It was a crazy idea, it was a bad idea,” D’Souza told Berman before being sentenced. “I regret breaking the law.”

Prosecutors had sought a 10-to 16-month prison sentence, rejecting defense arguments that D’Souza was “ashamed and contrite” about his crime and deserved probation with community service.

They cited statements D’Souza made on TV and the Internet after his guilty plea, where he complained about being “selectively” targeted for prosecution and having little choice but to plead guilty.

Berman appeared to accept the prosecutors’ position, playing a video in which D’Souza talked about selective prosecution – an effort at “spin,” the judge said.

ADVERTISEMENT

“I’m not sure, Mr. D’Souza, that you get it,” Berman said before announcing the sentence. “And it is still hard for me to discern any personal acceptance of responsibility in this case.”

The case has prompted criticism among some conservatives who accused the government of selectively prosecuting D’Souza because of his political views. Manhattan U.S. Attorney Preet Bharara, whose office brought the case, is an Obama appointee.

Despite comments early in the hearing, Berman ultimately decided against prison, instead ordering community confinement, which typically involves living under supervision in a center while holding a regular job.

ADVERTISEMENT

Benjamin Brafman, D’Souza’s lawyer, had argued no defendant in a case like D’Souza’s had previously been sent to prison.

“I’m just relieved and want to thank the judge for imposing a fair sentence,” D’Souza said after Tuesday’s hearing.

ADVERTISEMENT

The Indian-born D’Souza wrote the 2010 bestseller “The Roots of Obama’s Rage” and co-directed a 2012 film, “2016: Obama’s America,” which painted a bleak picture of the nation’s future if the Democratic president was reelected.

Prosecutors said D’Souza asked two friends and their spouses to contribute $10,000 each to Long’s campaign and then reimbursed them.

Campaign finance regulations at the time limited individual donations to $5,000 maximum during an election cycle.

ADVERTISEMENT

One friend was Denise Joseph, who was engaged to D’Souza while he was still married to another woman. D’Souza resigned as president of King’s College, a small Christian school in New York City, after the media revealed his relationship with Joseph in 2012.

The case is U.S. v. D’Souza, U.S. District Court, Southern District of New York, No. 14-cr-00034.

(Reporting by Nate Raymond in New York; Editing by James Dalgleish and Andrew Hay)