The corporation counsel for the city of Mount Vernon, New York, in Westchester County, was indicted Wednesday on charges of engaging in a scheme to divert public funds to pay for the criminal legal defense of the city's mayor.

Corporation Counsel Lawrence Porcari was arraigned in Westchester County Court in White Plains on the charges that carry a maximum sentence of 25 years in state prison if he's convicted.

The scheme was allegedly devised to fund the legal defense of Mount Vernon Mayor Richard Thomas, who is facing charges of stealing campaign funds and using money from his inaugural committee for personal expenses. Thomas is scheduled to go to trial in July.

Porcari was represented at arraignment on Wednesday by Nicholas Kaizer, a criminal defense attorney and partner at Levitt & Kaizer in Manhattan. Kaizer offered comment on the indictment on behalf of Porcari.

“He looks forward to a speedy resolution of the charges, at which point he'll be found not guilty of all charges,” Kaizer said.

The city's Law Department declined to comment. The mayor's office did not immediately return a call for comment.

Porcari was released on his own recognizance after arraignment on Wednesday, Kaizer said.

New York Attorney General Letitia James brought the charges against Porcari with State Comptroller Thomas DiNapoli through their Joint Task Force on Public Integrity. The task force is an effort between the two offices to investigate cases of alleged public corruption and bring criminal charges when found to be appropriate.

“New York has zero tolerance for those who cheat taxpayers, commit fraud, or violate the public trust,” James said. “My office is committed to rooting out corruption and bringing bad actors to justice at every level of government and in every corner of this state.”

Porcari was arraigned before Westchester County Court Justice David Zuckerman, who adjourned the case until June 5. Porcari was charged with seven counts of class B and E charges, including corrupting the government in the first degree and grand larceny in the second degree.

“Mr. Porcari allegedly violated both his duty as a public servant and as an attorney by diverting public money and falsifying records,” DiNapoli said.

The indictment alleged that Porcari allegedly arranged for funds from the city's Board of Water Supply, which consists of money from customers for their use of water, to be paid to two law firms defending Thomas against his own criminal charges. The money was also allegedly paid to a public relations firm.

The scheme allegedly continued from late spring last year into the fall. Porcari allegedly furthered the scheme by submitting memorandums to the Board of Water Supply for “emergency” payments to the law firms. Those requests contained false statements at times, according to the Attorney General's Office.

Neither the indictment nor the Attorney General's Office named the firms involved. But during the time of the alleged scheme, Thomas was represented by Randall Jackson. Jackson was a partner at Boies Schiller Flexner at the time, but moved over to Willkie Farr & Gallagher last November.

A spokesman for Boies Schiller Flexner said the firm is cooperating with the state's inquiry.

“The firm is cooperating fully with the New York Attorney General's investigation,” the spokesman said.

The case is being prosecuted by Assistant Attorney General Meagan Powers and Special Counsel Brian Weinberg from the Public Integrity Bureau.

READ MORE: