The conservative filmmaker behind a hit anti-Obama documentary was indicted Thursday night on charges he violated federal campaign laws, in what a close colleague is calling a “selective prosecution.”

Dinesh D'Souza, whose “2016: Obama’s America” is the second-highest grossing political documentary of all time, will appear in U.S. District Court in New York Friday.

The indictment states the 52-year-old best-selling author and activist will be charged with one count of illegally donating to a Senate campaign and one count of causing false statements to be made to authorities in connection with the contributions.

FoxNews.com has confirmed that the donation in question was made to Republican Wendy Long, who lost a 2012 Senate bid against New York Democratic Sen. Kirsten Gillibrand.

D’Souza is accused of directing various donors to give contributions to Long’s campaign totaling $20,000, and then reimbursing them. Individuals are only allowed to donate a maximum of $5,000 to a candidate per election cycle.

“Trying to influence elections through bogus campaign contributions is a serious crime,” George Venizelos, the assistant director in charge of the New York FBI office said in a statement. “Today, Mr. D’Souza finds himself on the wrong side of the law.”

D’Souza’s co-producer in “2016” Gerald Molen told FoxNews.com he believes D’Souza is being singled out by federal authorities.

The 2012 film examined President Obama’s past and early influences that may have shaped his political ideology and was a surprise hit, making over $33 million at the box office.

The duo is teaming up again for a new film “America,” which Molen said will be released on schedule in July 2014 regardless of what happens in the case.

“Neither the filmmakers nor the American public can allow this prosecution to deter us from the film's release, and I am calling upon the American people to show their elected officials that this kind of selective prosecution will not stand, by joining us at the box office,” Molen said. “I look forward to my good friend Dinesh being vindicated for what appears to be nothing more than a misunderstanding."

Molen, who won an Oscar as a co-producer for “Schindler’s List” said the charges against D’Souza deeply disappoint him, as D’Souza is a “great American.”

The indictment states the alleged illegal contributions came to light during the FBI’s routine examination of campaign contributions filed with the FEC during the 2012 election year.

D’Souza faces a maximum of two years in prison for the illegal contributions charge and a maximum of five years in prison for the false statements charge.

The indictment was announced by Venizelos and U.S. Attorney Preet Bharara, who was appointed by President Obama in 2009.