Conservative commentator and best-selling author, Dinesh D'Souza exits the Manhattan Federal Courthouse after pleading guilty in New York, May 20, 2014. (REUTERS/Lucas Jackson)

A federal judge on Tuesday sentenced Dinesh D’Souza to five years of probation, including eight months in a community confinement center, ordering no jail time for the conservative author and pundit who pleaded guilty to using straw donors to make an illegal campaign contribution. 

U.S. District Judge Richard Berman handed down the sentence, which also includes a $30,000 fine. D'Souza must attend weekly therapeutic counseling sessions and perform community service, the judge said.

The sentence is more lenient than the prison time sought by prosecutors.

D’Souza pleaded guilty in May to violating campaign finance laws. Prosecutors said he had other individuals donate money to Republican Wendy Long, a Republican challenging Sen. Kirsten Gillibrand (D-N.Y.) in 2012, under the agreement that he would reimburse them for the donations.