The Paul S. Sarbanes Transit Center in Silver Spring, shown in October 2015. (Katherine Frey/The Washington Post)

The Silver Spring Transit Center was five years late and $47 million over budget when it opened in September 2015. Now Montgomery County is spending additional millions suing the project’s designers, builders and inspectors in an attempt to recoup lost public funds.

The county has accrued nearly $4 million in fees to the outside law firm hired to try the case, County Attorney Marc Hansen said in response to a query from The Washington Post. And the meter will be running for quite a while longer. Trial is scheduled to begin in May and last about a month, and Hansen estimated that appeals could take an additional 18 months.

At the same time, the county is facing an expensive legal challenge from Pulte Home Corp., which is seeking $165 million in damages, plus legal costs, related to the County Council’s decision to sharply limit construction on land the builder owned near Clarksburg. The county has paid an outside firm, Whiteford Taylor Preston, just over $400,000 so far to handle the matter.

Hansen operates an office with about 50 lawyers and an annual budget of $10 million. But the county charter empowers him to hire outside legal help when he thinks it is appropriate. Hansen said the breadth and scope of the transit center and the Pulte lawsuits exceed his staff’s ability to respond while it fulfills its other duties. As it is, Hansen said, two county attorneys are working on each of the cases. He called the transit-center lawsuit the biggest and costliest the county has been party to on his six-year watch — both in terms of outside counsel and the sheer number of expert witnesses and documents.

In an interview this week, County Executive Isiah Leggett (D), a former professor and assistant dean at Howard University Law School, said the upfront costs are an inevitable part of such litigation. He repeated his vow to recover “every penny” of expense to the county, including legal fees.

“These are highly, highly complex cases, cases where the risks to the county are extensive,” Leggett said.

Hansen said that if the county wins the transit center case, it will have to convince the judge that its contracts with the defendants include recovery of legal fees. As for the Pulte case, unless a court finds the lawsuit frivolous or groundless, the county is unlikely to be reimbursed for legal costs, even if it prevails.

Montgomery can use its capital construction budget to pay for the transit-center lawsuit, which seeks damages against designer Parsons Brinckerhoff, general contractor Foulger-Pratt and the Robert B. Balter inspection company for negligence and breach of contract.

It is paying to defend the Pulte litigation through a self-insurance fund that includes contributions from the county and other local government entities.

In the transit-center case, the county contends that a faulty design led to cracks in concrete and other deficiencies in the three-story transportation hub and that the companies failed to properly supervise construction and inspection. It wants to recover the $47 million in cost overruns along with $20 million in damages. Metro is seeking its own damages.

The defendants have denied the charges and filed $10 million in counterclaims against the county, which they say failed to properly manage the project.

The county hired the law firm Saul Ewing — which was involved in litigation triggered by Boston’s “Big Dig” and other troubled public-works projects — to lead its legal team. The firm has committed 28 lawyers to the case, led by Garry Boehlert, co-chair of its construction practice. Their hourly rates range from $525 for partners to $375 for associates, which Hansen said was a significant discount.

In the Clarksburg case, Pulte is arguing in federal court that the County Council violated its civil rights by cutting buildable acreage from 541 acres to 96. The firm also alleges the company was treated differently than other property owners in the environmentally protected Ten Mile watershed. Whiteford Taylor Preston has used 18 lawyers on the matter, led by John Hathway. Their hourly rate is $330.

The county also has hired outside counsel to help complete an agreement with a private developer to build a life-science town center in White Oak. The agreement hinges on the developer, Percontee, receiving Planning Board approval of detailed site drawings.

Hansen said his office has relatively little experience dealing with the Planning Board on such projects. Through September, the county had paid the firm of Bregman, Berbert Schwartz & Gilday $5,379 for its work on the case, according to county records. The lead attorney in the effort is former Planning Board chair Francoise Carrier, whose hourly rate is $330.