TROY — A city code enforcement officer was charged with several felonies related to the sale of a tax-delinquent property to a former city engineer at a deep discount.

James E. Lance III was arraigned in City Court on Thursday on felony counts of grand larceny as a public corruption crime, corrupting the government, tampering with public records, offering a false instrument for filing, falsifying business records and defrauding the government. He was also charged with official misconduct, a misdemeanor.

Lance, 34, is being prosecuted by the state attorney general's office, which began investigating the sale of 226 Cemetery Road last fall.

He pleaded not guilty and was released on his own recognizance. The case was sent to a grand jury.

Assistant Attorney General Bridget Holohan Scally declined to comment on the case.

The charges are connected to a letter Lance allegedly wrote in late September 2015 about the Cemetery Road property. The city's then-engineer, Andrew Donovan, bought the 1.85-acre plot in Lansingburgh earlier that year for $3,500 and promised to build a single-family home on it.

The City Council signed off on the sale at a special meeting on Feb. 5, 2015. Donovan signed a "reverter clause" that would allow the city to take back the land if Donovan did not make the promised improvements.

But no home was built, and Donovan tried to sell the land for $65,000.

According to documents filed in city court, Lance was asked by his direct supervisor — who is not named in the court documents — to write a letter for Donovan that would put the property in compliance with the reverter clause. Court documents say that Lance wrote the letter on Sept. 28, 2015.

As city engineer, Donovan oversaw the city's code department but was not Lance's direct supervisor. He could not be reached for comment; court documents do not indicate whether he will also be charged.

Donovan resigned his city post on April 15, 2016, and put the land on the market for $65,000.

Mayor Patrick Madden signed the release of the reverter clause on March 2, 2016, giving up the city's right to rescind the sale to Donovan. Madden previously said his office was merely following established protocol when it waived the clause.

In June 2016, Donovan told the Times Union he decided to put the land on the market because he no longer worked for the city and didn't want to build a home on the parcel.

Lance's attorney, Marc R. Pallozzi, said he became aware of the complaint last week and said Lance intends to fight the charges, which he called "very, very defensible." Lance has no previous convictions.

Lance was a state certified code enforcement official at the time he allegedly wrote the letter for Donovan in 2015, but his certification history is spotty. He was not certified in 2016, and he is not currently a state certified inspector, according to information provided by the state Department of State, which oversees building code training.

John Salka, the mayor's spokesman, said the city takes the allegations seriously and added that Lance had been placed on administrative leave.

Troy City Council President Carmella Mantello and other members of the City Council asked the Attorney General's office to investigate after the Times Union published an article in 2016 that raised questions about the sale.

On Thursday, Mantello released a statement calling for "an immediate interim moratorium on waiving any further reverters."

Madden's office turned over documents to investigators last year. State officials interviewed at least two council members about the February 2015 sale of the parcel. Officials said developers and city code enforcement office employees were also interviewed.

Internal city emails obtained by the attorney general's office were mentioned during the interviews, officials said last year.

The city formerly sold tax-delinquent properties to the highest bidder, but the policy was changed under former Mayor Harry Tutunjian. The current system relies on a panel of city appointees to weigh the best proposals for properties and send recommendations to the mayor's office for approval.

Reverter clauses were used to give the city leverage if a buyer failed to follow through on promises to improve the property or live at the homes they purchased for a set amount of time.

Tutunjian's successor, Mayor Lou Rosamilia, signed off on Donovan's purchase and sent it to the City Council for final approval. Rosamilia left office at the end of 2015.

The land remains on the market.