Conservative scholar and filmmaker Dinesh D’Souza pleaded guilty to a charge related to claims that he used straw donors to contribute to a Republican candidate’s campaign for a New York Senate seat in 2012.

D’Souza, 52, was scheduled to go on trial this week, but an advisory that was sent out Monday evening by the government indicated that he would plead guilty, which he did hours later in front of Judge Richard Berman.

“Guilty, your honor,” D’Souza said at a hearing held Tuesday morning, admitting that he did ask two people to donate to the candidate before later reimbursing them for doing so. 

By admitting guilt, D’Souza has lost his right to vote, hold public office or possess a firearm. He faces up to two years in prison, three years supervised release and up to a $250,000 fine, reported Townhall.com.

In this publicity image released by Rocky Mountain Pictures, director Dinesh D’Souza, interviews George Obama in his film, “2016: Obama’s America.” (AP Photo/Rocky Mountain Pictures, File)

Sentencing will be Sept. 23, 2014, according to Townhall.com.

The development comes just one week after D’Souza failed to win a dismissal of the charges against him. He has maintained his innocence throughout the criminal case, which commenced in January when he pleaded not guilty and was released on $500,000 bond.

D’Souza was accused of having two of his friends each give $10,000 to Wendy E. Long’s campaign to unseat Democratic Sen. Kirsten E. Gillibrand.

According to the New York Times, prosecutors allege that he planned to reimburse these individuals for their donations, which meant that he would have exceeded the $5,000 limit that each donor was allotted for the 2012 election.

Benjamin Brafman, D’Souza’s attorney, has charged that his client was targeted over his criticism of President Barack Obama. This claim was echoed by famed Hollywood producer Gerald R. Molen, who is working with D’Souza on his new documentary, “America.”

“There’s not a shred of doubt in my mind that this was a selective prosecution,” Molen said in an email interview with TheBlaze Tuesday. “It will have no impact on the ‘America’ movie, other than to make us work harder to make sure that millions of Americans get a chance to see this important film.”

D’Souza directed the documentary “2016: Obama’s America” and is preparing to release “America” in July. “2016″ ended up becoming one of the most successful political documentaries of all time, bringing in more than $32 million.

(H/T: New York Times)