The parent company of 1st Mariner Bank said Monday that it has signed a deal to sell the bank after years of regulatory demands that it increase its capital, potentially ending the company's long struggle to right itself after the mortgage crisis.

A group of investors, many with local ties, have agreed to buy the Baltimore bank — the largest based in the region — and recapitalize it with about $100 million.

First Mariner Bancorp, the parent company, said it filed for Chapter 11 bankruptcy protection Monday afternoon in Baltimore federal court to "facilitate the transaction."

Officials stressed that 1st Mariner Bank itself is not included in the bankruptcy, and that deposits, loan commitments and contracts with vendors will not be affected. It's the parent company's shareholders — including founder Edwin F. Hale Sr. — and creditors who will feel the impact.

Federal and state regulatory approval would be required for the sale. Banking consultants said Monday they expect regulators to consent because the deal appears to be the only way for the bank to avoid a takeover by the Federal Deposit Insurance Corp.

Company officials called the agreement the best option they had. They expect the sale, if approved, will close in April.

"For four years, the bank has been under a regulatory order that it's been trying to satisfy, and we've reached the finish line," said Mark Keidel, interim president of 1st Mariner Bank. "This agreement … puts the bank on much firmer financial ground — and quite frankly gives us the ability to be back on offense."

The investment group is led by Priam Capital, Patriot Financial Partners, GCP Capital Partners and TFO Financial Institutions Restructuring Fund LLC, along with "several prominent members of the Baltimore business community," First Mariner Bancorp said.

Priam, a New York investment firm led by Baltimore native Howard Feinglass, agreed in 2011 to invest $36.4 million in First Mariner Bancorp in exchange for a nearly 25 percent stake in the company. But the deal never went through. First Mariner couldn't raise the $123.6 million from other investors that the agreement required.

Now Priam is back, the biggest investor on a team that will act as the stalking-horse bidder for the bank in the parent company's bankruptcy process. Feinglass would become a member of a reconstitued board for the bank if the deal goes through but said he otherwise would have no role in managing the bank.

"The bottom line is I'm incredibly proud to be supporting an investment in my own hometown that I think has great prospects," he said Monday of a recapitalized 1st Mariner.

Without an infusion of capital, the bank's prospects weren't good.

Most recently, the bank's parent company was unable to pay millions of dollars in interest payments on trust preferred securities — a bond-stock hybrid — that were due in December.

Something had to give.

"The FDIC did not want this as a receivership," said Brian Casey, a Towson-based banking consultant. "No other bigger bank really wanted this in terms of where the market is. It's too big for the smaller banks to absorb. This [deal] is really the only way you're going to get out."

Feinglass said the bank's woes mainly stem from so-called "Alt-A" residential mortgages — loans that don't qualify as prime but were seen as less risky than sub-prime — that soured quickly in the housing bust. Huge write-downs in value caused the capitalization problems, he said.

He's confident that a revitalized 1st Mariner can be a major player in commercial lending to local businesses, the small and midsize firms that he says aren't served well by big banks.

Feinglass said he pursued the deal because 1st Mariner is the largest local bank in a sizable region, with just over $1 billion in assets, 16 branches and 460 employees. He sees an opportunity to essentially re-create Baltimore-based Mercantile Bankshares — an admired local institution bought out by PNC Financial in 2007.

Feinglass, who graduated from Baltimore's Gilman School in 1978, later served on the school's board with longtime Mercantile CEO H. Furlong Baldwin. Two former Mercantile executives under Baldwin — Jack E. Steil and Robert D. Kunisch Jr. — have signed on to head the reorganized bank.

Steil would be chairman and CEO; Kunisch would be president and chief operating officer. Both also are in the investors' group planning to buy the bank. And they advised 1st Mariner from July 2011 to July 2013.