GUILDERLAND — A Guilderland town justice and another attorney were arrested Friday on felony charges for allegedly stealing about $4 million from trust funds connected to the estates of three sisters, including one who was married to a deceased General Electric Co. executive.

Town Justice Richard J. Sherwood, 57, and attorney Thomas K. Lagan, 59, are business associates who are accused of devising a scheme to steal the money that originated from the estate of Walter Bruggeman, the former head of Global Nuclear Energy at General Electric.

Bruggeman graduated from Rensselaer Polytechnic Institute in Troy and died in 2009 with about $20 million in his estate. He and his wife, Pauline, who died in 2011, were noted Capital Region philanthropists who gave millions of dollars to local charities and churches.

Sherwood and Lagan, who provided estate planning and financial advice to the couple since at least 2006, both were arrested Friday morning after an investigation by the state Attorney General's office, the U.S. Attorney's office and the FBI. They are accused of diverting about $4 million in trust fund money into accounts they controlled. The money was intended to be donated to charities, according to court records.

Sherwood is a Democrat who had been a town attorney in Guilderland for 14 years before he was elected town justice in 2013. He ran unsuccessfully for Albany County Surrogate Court judge in 2014, and had been active in the community for many years in Guilderland, including heading Little League baseball programs.

Lagan, an attorney since 1986, is also a financial advisor and former Capital Region resident who now lives near Cooperstown, where he owns numerous properties. Lagan previously worked for Ayco Co. in Albany.

Investigators separately escorted both men, each handcuffed, into Albany City Court on Friday afternoon. They were arraigned before Judge Gary F. Stiglmeier on a six-count felony information charging them with grand larceny, scheme to defraud and criminal possession of stolen property. Stiglmeier released them both on their own recognizance and they left court without speaking.

Sherwood and Lagan had provided estate planning and financial and legal advice to Bruggeman and his wife Pauline, as well as her sister, Anne Urban. The Bruggemans created a $4.2 million family trust intended to provide for Anne Urban and Pauline’s other sister, Julia Rentz of Ohio, upon the death of Pauline Bruggeman.

The complaint alleges Sherwood and Lagan diverted more than $4 million from at least two estates to accounts they controlled. In one instance, more than $1 million in stolen funds were used to fund the Empire Capital Trust, an account that Lagan and Sherwood set up for their benefit, according to the complaint.

The $4 million that was allegedly stolen was supposed to be given to at least six Capital Region charities, which were not identified in the court filings.

Authorities raided Sherwood's law office off Washington Avenue Extension and interviewed him there on Wednesday.

Sherwood had been a partner at the firm of Mazzotta Sherwood and Vagianelis on Washington Square in Albany. A woman who answered the phone at the firm Friday said Sherwood no longer worked there. His name was recently removed from the firm's website.

Sherwood is a former vice chairman of the Albany County Airport Authority and a former chairman of the Albany County Ethics Commission. Earlier in his career, he was a law clerk to the state Supreme Court Justice Daniel H. Prior, Jr., and also had been a clerk with the U.S. Attorney’s office in Albany.

Sherwood, who specializes in estate planning and elder law, was represented at his arraignment by attorney William J. Dreyer of Albany. Lagan was accompanied by Ryan Miosek, an attorney from Cooperstown.

Investigators confronted Sherwood at his former law firm on Wednesday, according to court records, and he allegedly made admissions that "the scheme, including the wording of the trusts, was devised by Lagan but that he, Sherwood, drafted the documents in order to effectuate it," according to a criminal complaint filed in Albany City Court.

“We have zero tolerance for those who try to game the system and violate the public trust in order to line their own pockets," Attorney General Eric Schneiderman said in a statement issued following Friday's arrests.

Dreyer told the Attorney General's office that Sherwood will voluntarily take a leave of absence from his position as town justice while the case is pending. The state Constitution authorizes the Court of Appeals to suspend a judge who is charged with a felony or a crime of "moral turpitude," but it remained unclear late Friday if the court would intervene.

In 2008, Sherwood's conduct as town attorney in Guilderland came under scrutiny by the Town Board after he recommended a property tax reduction for property owned by a legal associate. Sherwood recommended a $540,500 assessment reduction on the property owned by a counsel at another one of Sherwood's former law firms without disclosing his connection.

Sherwood also advised the town in 2008 to approve a settlement in a lawsuit challenging the $3.22 million assessment on the Walgreens drug store at 2061 Western Ave. The pharmacy said the property was worth $2.68 million, and Sherwood agreed with that figure, according to town records.

Sherwood did not tell the five-member board that the chief executive of the company that co-owned the property was also a counsel for the former Albany law firm of Segel, Goldman, Mazzotta & Siegel, where Sherwood was employed at the time.

An earlier version of this story listed the wrong day that investigators raided Richard Sherwood's law office. That took place on Wednesday, Feb. 21.