With its capital depleted by heavy losses in its loan and investment portfolios, Service Bancorp Inc. in Medway, Mass., is selling itself to one of its competitors.

The $401 million-asset parent of Strata Bank said Monday that is selling to Middlesex Savings Bank, a mutual thrift based in Natick, for $21.8 million in cash.

Service was already struggling to contain losses on construction loans when its investment portfolio was whacked in September by the Lehman Brothers failure and, especially, the government takeover of Fannie Mae and Freddie Mac.

Like many other banking and thrift companies, Service suffered as the value of its investments in Fannie and Freddie preferred shares plummeted after the government-sponsored enterprises were seized. Service took a $6.6 million charge on its Fannie and Freddie shares and another $1.9 million charge on Lehman Brothers bonds it held. As a result, its total risk-based capital ratio sank to 8.01% at Sept. 30, just barely above the threshold for being considered adequately capitalized.

Service is at least the third banking company with heavy exposure to Fannie and Freddie preferred shares to be forced into a sale. Gateway Financial Holdings Inc. in Virginia Beach and Franklin Bancshares Inc. in Tennessee agreed to sell themselves in September after massive writedowns on the securities had depleted their capital.

In addition, Service had been roughed up by problem loans lately. Its loan-loss provision in the fiscal year that ended June 30 jumped by nearly 700% from the previous year, to $5 million.

"It was the combination of some loan charges followed by investment losses," Edward A. Hjerpe 3rd, who has been the interim president and chief executive officer of both Service and Strata Bank since September, said in an interview Monday. "Those things combined left the institution in a situation where it had to examine its strategic alternatives."

The problems did not scare away the $3.6 billion-asset Middlesex Savings.

"We think the transaction makes a lot of sense, not only for them, but for us, as well," said John R. Heerwagen, Middlesex Savings' chairman, president, and CEO.

The 137-year-old Strata Bank has eight branches. Mr. Heerwagen said Strata would give his thrift branches in at least three towns where it has none — Bellingham, Franklin, and Medway — and help it boost market share in others.

In towns where there is overlap, some branches might be consolidated, and the potential savings were factored into the deal price, he said.

Roughly 46% of Service's shares are publicly held. Middlesex agreed to pay $28 for each of those shares, or a 269% premium over their closing price Friday.

The deal price works out to about 108% of Strata's overall tangible book value, Mr. Heerwagen said. That means the shareholders will be getting paid for the entire value of the company, even though they own less than half of it.

For the public shareholders, the premium over tangible book value is roughly 230%, he said.

Industry observers said a few other companies hit hard by losses on Fannie and Freddie shares might be forced to sell, but Matthew Anderson, a partner at Foresight Analytics LLC in Oakland, Calif., said he thinks the Treasury Department's Capital Purchase Program could end up helping some companies survive large impairment charges without having to sell themselves.

"Small banks that experienced a big hit were being encouraged to participate," Mr. Anderson said.

Mr. Hjerpe would not say whether Service had applied for government capital.

Mr. Heerwagen said the depleted capital would not be troublesome for Middlesex Savings, which had a total risk-based capital ratio of 17.5% as of Sept. 30.

Middlesex Savings also accounted for the possibility of more loan trouble in pricing the deal, he said. "We are very impressed with the work the current group is doing on the loan portfolio."

Mr. Heerwagen said Middlesex Savings has not made an acquisition since 1988 but would be interested in making more deals if they make sense.

The deal is expected to close by the end of March.

It is unusual for a publicly traded thrift company to be acquired by a mutual one, though there have been at least two such deals in Massachusetts in the past year or so.

In March, Eastern Bank Corp. in Boston announced a deal to acquire Massbank Corp. in Reading, a former mutual that had converted to a public company. Last year Hudson Savings Bank absorbed Westborough Bank, which had been partially public.

Subscribe Now

Access to authoritative analysis and perspective and our data-driven report series.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.