Law firm mergers are on track for another record year, according to Altman Weil Inc., the Newtown Square-based legal consulting firm.

There were 52 mergers through the first six months of this year, Altman Weil said, topping 48 combinations for the first six months of 2016. The merger market has been hot for several years now, and a key factor is anemic spending by corporate clients on legal services, the firm said.

There were a total of 85 mergers in 2016 and 91 the year before, the most ever.

Among the mergers in the first half of this year was the acquisition by Center City's Fox Rothschild LLP of Riddell Williams P.S., a 39-lawyer firm in Seattle, and the acquisition of a four-lawyer group in New York by Montgomery McCracken Walker & Rhoads LLP.

"Demand has failed to return to pre-recession levels at 65 percent of law firms," said Eric Seeger, an Altman Weil principal. "The chief driver of combinations is the battle for market share that's being waged in response to flat or decreasing demand for law firm services."

In response to the recession of 2008 and 2009, many companies cut back on spending for legal services, forcing law firms themselves to make cutbacks. Though economic growth overall has since bounced back, many companies have sought to bring legal work in-house or instituted other cost-saving measures.

In a survey by Altman Weil of nearly 400 law firm leaders, published in May, 61 percent said overcapacity was making their firms less profitable. And 52 percent of law firms reported that their equity partners weren't sufficiently busy.

Amid flat spending by corporate clients, many firms are finding that the only way to grow is through acquisitions, a strategy employed by Fox Rothschild, which has increased in size from 500 lawyers in 2009 to more than 800 now. Mergers in and of themselves aren't a cure for overcapacity, but a well-executed acquisition can improve law firms' financial health by causing clients to give more of their work to the combined operation.

Most of the acquisitions occurred domestically, Altman Weil said. But there were several large cross-border combinations, including the largest deal announced in the second quarter — the merger of 500-lawyer Womble Carlyle, a North Carolina-based firm with an office in Wilmington, and Bond Dickinson, a 580-lawyer firm based in the United Kingdom. In all, there were 11 cross-border mergers in the first half of the year.

Dentons, a major multinational firm headquartered in New York, picked up a small firm in Myanmar, following in the footsteps of Center City's Duane Morris LLP, which opened there several years ago and handled the first initial public offering on the Myanmar stock exchange.