Correction: An earlier version of this article misidentified GeneDx co-founder. He is John Compton, not John Thompson.

Former Montgomery County Executive Doug Duncan talks with Karen Rothman after a political event in 2012. (Katherine Frey/The Washington Post)

Montgomery County is retreating from its commitment to the life sciences by closing its Rockville biotech incubator and replacing it with a cybersecurity center, county executive candidate Doug Duncan said Thursday.

The William Hanna Center for Innovation at Shady Grove houses 34 biotech start-ups that rent office and lab space from the county as they try to develop their businesses. The center, which opened in 1999 during the second of Duncan’s three terms as county executive, sits in the medical and science community that flanks Interstate 270. The tech corridor includes companies such as Aeras and Macrogenics, as well as the National Cancer Institute, a Johns Hopkins University campus and the state’s Universities at Shady Grove campus.

But Montgomery recently announced that it is ending its leases with the start-ups in June to convert the building into a cybersecurity “center of excellence,” in partnership with the state and the National Institute of Standards and Technology. The center would bring government, academia and private companies together to improve information security in the private sector. The venture is financed primarily with funding secured by Sen. Barbara A. Mikulski (D-Md).

Duncan, who is running against incumbent Isiah Leggett and County Council member Phil Andrews (Rockville-Gaithersburg) for the Democratic nomination, said the decision sends an unfortunate message about the county’s commitment to the biotech sector.

“They’ve decided that cyber­security is the flavor of the month,” said Duncan, appearing at a news conference Thursday with executives of some of the firms that are being displaced. “They got some federal money, and the easiest way for them to spend it is to throw 40 companies out on the street.”

Duncan’s defense of the biotech incubator is his latest attempt to make a case for unseating Leggett, who is in his second term. In recent weeks, he has assailed the Leggett administration’s handling of construction problems at the Silver Spring Transit Center. He also came out more forcefully than Leggett against new construction in the Ten Mile Creek watershed.

Duncan said Thursday that he didn’t understand why the county would gut a building with expensive infrastructure, including 24 wet labs, rather than find another location for the cybersecurity center.

Steve Silverman, the county’s economic development director, said Duncan “doesn’t have his facts straight.” He said that there is no other suitable county-owned space and that it is “not financially possible to support the cybersecurity facility in private space.” He estimated that providing private space would cost three times as much as repurposing the incubator.

Silverman said that the county is working with property managers to find suitable space for the displaced start-ups and that he will have a plan by the end of the month. He said there is also a possibility of expanding a county incubator in Germantown to accommodate some of the biotech firms.

“What’s Duncan’s solution? Does he want to spend millions of dollars more to re-create another incubator?” Silverman asked.

Silverman defended the county’s commitment to biotech, which includes the purchase of land near the Food and Drug Administration headquarters in eastern Montgomery that is slated to become part of the White Oak Science Gateway. He also cited what he called the nation’s first local biotech investment tax credit and millions in economic development grants to life science companies.

“To suggest we’ve turned our backs on biotech just doesn’t jibe with the facts,” he said.

The news conference was held at the Gaithersburg headquarters of GeneDx, a 300-employee diagnostics and genetic-testing firm that started in the Shady Grove incubator with just two workers.

“We’re not certain we would have started our company without this system being in place,” GeneDx co-founder John Compton said. “We don’t quite see what the county has in mind by closing this facility.”

Some of the firms being displaced moved into the incubator fairly recently. Brain Bio, which is developing brain-imaging devices for the diagnosis of Alzheimer’s disease and other conditions, arrived in May, chief executive David Beylin said. He said the company’s 400-square-foot space is ideal because he can’t afford the typical 5,000-square-foot facility he would have to rent on the private market.

“The reduction in incubator capacity is not a friendly message,” Beylin said.

Representatives of the start-ups met recently with Leggett to ask that the incubator remain in place. Aprile Pilon, founder and chief executive of Clarassance, a pharmaceutical firm, described Leggett as “angry” and unwilling to consider reversing the decision.

Through his spokesman, Leggett said: “I asked them to come meet with me. I heard them out. We just didn’t agree. We told them we were prepared to help, and the offer still stands.”