Montgomery County Executive Marc Elrich (D) has served as an advocate of tenant rights since the 1980s. (Cal Cary for The Washington Post)

Montgomery County has completed a two-year initiative to inspect all the multifamily rental properties under its jurisdiction, County Executive Marc Elrich (D) announced Thursday. According to officials, this was the most aggressive inspection surge undertaken in the Washington area and marks the first time that this many rental units were inspected over such a short period of time in the county.

The completion of the inspection surge also represents a win for Elrich, who has spent decades as a persistent — and sometimes lone — voice for tenant rights among local officials in the wealthy D.C. suburb, experts said.

The Department of Housing and Community Affairs inspected more than 22,000 apartment units in 664 apartment buildings, representatives said. They said they identified more than 31,000 violations, 96 percent of which have been corrected. During a three-day sweep of one complex in White Oak earlier this year, housing inspectors discovered more than 2,500 code violations.

“This is a big step forward for the county,” Elrich said at a news conference.

In an interview later, Elrich said that landlords had “relied for a very long time on not getting their apartments inspected . . . After years of neglect, this is a statement that we’re going to be serious about it.”

Tim Goetzinger, the acting director of the Department of Housing and Community Affairs, said the inspection surge has allowed the department to form a baseline understanding of all the rental properties in the county and come up with a “troubled property list.” Properties on the list will have all their units inspected every year instead of every three years, he said.

Elrich’s announcement comes two days before the third anniversary of the 2016 explosion at the Flower Branch apartments that destroyed two buildings and killed seven people in Silver Spring.

The tenant rights bill that called for the inspection surge was introduced by Elrich before the explosion but had been “languishing” in the council for over a year, said County Council member Tom Hucker (D-District 5). Four months after the incident, the bill was passed unanimously.

“I wish the impetus had been natural rather than reactionary, but it got done,” said Elrich, who rode a wave of progressive voters to win the county executive race last year.

In April, the National Transportation Safety Board said the explosion was caused by failures in Washington Gas equipment, which the gas company, and not the landlord, was responsible for maintaining. NTSB regulators also said, however, that despite multiple reports of residents smelling gas before the explosion, Kay Management, which runs the Flower Branch apartments, did not notify Washington Gas.

For years, said Matt Losak, executive director of the Montgomery County Renters Alliance, the 400,000 tenants in Maryland’s most populous jurisdiction have not enjoyed the same attention as homeowners.

“Montgomery did not have an appetite of renters’ protection,” he said. “What is taking place now is a recognition, finally, of a major demographic change for who lives in Montgomery ­County.”