BOSTON — One of the three men charged in April by federal prosecutors for participating in a scheme to defraud investors in a Medford biotech company spent at least nine years working for Secretary of State William Galvin, whose office is in charge of securities enforcement.

M. Jay Herod, 51, of Cambridge, was working in the Secretary of State's office as an information technology consultant at the time of his arrest on April 24 when he was charged with securities fraud.

Herod allegedly helped his friend and former roommate Frank Reynolds, along with a third man, manipulate the price of shares in a company called PixarBio Corp., which was falsely pitched to investors as being on the cusp of developing a drug that could help end "thousands of years of morphine and opiate addiction."

The trio charged in the PixarBio case allegedly raised $12.7 million from 211 investors beginning in December 2015. The Securities and Exchange Commission complaint states that more than 30 of those investors were from Massachusetts.

Though the secretary's office said Galvin did not become aware of Herod's alleged involvement in the penny stock fraud case until the day of his arrest and immediately terminated his contract, Galvin has not previously acknowledged Herod's work for his office in the four months since the Cambridge man was arrested.

"Obviously, the Secretary does not condone the actions that have been alleged, which is why he terminated this consultant's contract immediately upon learning of them," Galvin spokeswoman Deb O'Malley told the News Service.

O'Malley did not say why Galvin did not immediately acknowledge Herod's work for his office, and the criminal complaint does not specify Herod's place of employment.

Herod, who was hired as a contractor through the Newton-based staffing firm PeopleSERVE, worked as a Registry of Deeds network and applications specialist for the various registries around the state, according to O'Malley. State vendor records maintained by the Comptroller's office show that PeopleServe was paid $1.27 million since August 2009 for Herod's services, or about $140,932 a year. The last payment was processed on June 12, and Galvin's office said the payment was for an invoice for work completed the week ending April 21, before Herod's arrest.

Galvin's office confirmed Herod's employment as a contractor late last week after receiving an inquiry from the News Service. The link between Herod, who conducted at least some of his activities during state business hours, and Galvin's office comes as the secretary is seeking a seventh term.

Facing an upstart primary challenge from Boston City Councilor Josh Zakim, the 67-year-old Galvin has been arguing his case that experience matters.

In fact, a month after Herod's arrest, Galvin released a promotional video featuring a woman named Rosemary M. of Burlington who said she had been victimized by a brokerage firm that she trusted with her retirement investments.

After losing her savings, the secretary of state's office helped her get her money back, she said.

"If you think you were defrauded by an investment, call us," Galvin says into the camera, with the number to his Securities Division displayed. That ad was published online on May 21.

In a separate campaign ad touting his securities enforcement, Galvin says, "From protecting pensions to stopping fraud, my job is to end the rip-offs and put money back in your pocket." That campaign spot highlights an article about his race published by InvestmentNews that described Galvin as "the most widely feared securities regulator in the industry" in the years following the financial crisis.

Galvin and Zakim are set to debate twice this week, including for the first time on Tuesday night on WGBH's "Greater Boston" hosted by Jim Braude.

While the secretary of state's office is best known for its role in overseeing state elections, one of the principal duties of the office is also securities enforcement. Just this year, Galvin has opened an investigation into Wells Fargo advisors, charged MetLife with fraud in connection to failed pension payments and cautioned against getting involved in Bitcoin speculation.

Herod, who was assigned to the Registry of Deeds Division, worked one floor beneath the securities division on the 16th floor of One Ashburton Place across the street from the State House. As of last Wednesday, his direct line still had his name and voice connected to the voice mail box.

While Reynolds is described in the criminal complaint as the architect of the scheme to inflate the prospects of PixarBio to lure investors, FBI investigators allege that Herod and a third defendant, Kenneth Stromsland, began making "manipulative trades" of stock around November 2016 to stimulate market interest and inflate the price of PixarBio shares.

The two men also actively solicited investors "in person, on the phone, or by mailing, emailing, and/or posting on PixarBio's public website various materials written by Reynolds," the SEC complaint states.

Some of Herod's trades included small purchases to boost the trading price of PixarBio right before the market close at 4 p.m.

For example, the criminal complaint alleges that Herod submitted an order to buy 100 shares at 12:21 p.m. on Dec. 20, 2016, at a price designed to slow the PixarBio's sliding share price. He made additional orders of stock at 12:58 p.m. for the same reason.

In all, the complaint documents alleged fraudulent trades made by Herod on at least seven work days in late 2016. It's unclear whether Herod was on the clock or using state resources at that time to make the trades - O'Malley said Herod's work involved varying hours and locations at registries around the state.

Between October 2016 and January 2017 when the Securities and Exchange Commission suspended trading of PixarBio shares, investigators allege that Herod sold his shares at a profit of $877,488. He reinvested $500,000 back into the company, gave $300,000 to Reynold's wife and kept the remaining profit for himself.

The next court date for the PixarBio case defendants, who have each pleaded not guilty, is scheduled for Sept. 10.