Mergers between community banks are clubby affairs. Directors at these small banks usually maintain comfortably high ownership stakes so when they decide to do a merger it gets done. And such mergers are usually considered a beneficial way to bulk up while spreading costs over a bigger balance sheet.

So what went awry at Millennium Bankshares Corp.?

Last week, shareholders of Reston-based Millennium voted down its proposed merger with Charlottesville's Albemarle First Bank, an exceedingly rare defeat. "I was surprised," Thomas Boyd Jr., chief executive of Albemarle, said in an interview.

"It's extremely unusual," said David G. Danielson, president of Danielson Associates of Rockville, a bank merger and acquisition advisory firm. "It's customary to get a commitment from a board to vote for these mergers, and I presume that happened here, so it's almost standard operating procedure for shareholders to approve a merger."

But not much at Millennium has been standard operating procedure since it was formed in 1999. Its mortgage banking operations, an early engine of its growth, cratered in 2002, causing losses and a restatement of its results. Its recovery since then has been uneven.

And Millennium was vulnerable to a shareholder rebellion. Management and directors collectively own just 10 percent of the stock. Most community banks its size, especially those as young as Millennium, have much higher percentages of inside ownership.

The deal's rejection was yet another indication that in an era of increasingly restive hedge funds and heightened scrutiny of board accountability, even mergers that seem to be slam dunks are no sure thing.

Anita L. Shull, president of Millennium, declined to discuss the shareholder vote, and Millennium has not disclosed the results other than to say that a crucial provision of the deal, to increase the number of Millennium shares, failed to pass. It required two-thirds approval by shareholders.

"We're disappointed," Shull said. "We thought Charlottesville was going to be a great market. But we're poised and ready to move forward in 2006."

Carroll C. Markley, a longtime Northern Virginia banker who founded Millennium and is its chief executive, could not be reached for comment.

The deal with Albemarle appeared to be a fairly straightforward $29 million cash-and-stock merger. In announcing the deal June 10, Markley said the merger would give Millennium 10 branches in three of Virginia's biggest markets: Northern Virginia, Charlottesville and Richmond. Combined, the two institutions would have $550 million in assets. "There were lots of synergies," Shull said.

Yet because Millennium would have had to issue more shares to make the deal, it would have diluted the value of shares held by existing Millennium shareholders. A major shareholder protested that shaving the value of the stock was unacceptable, even though he bought his shares after the merger was announced.

"We find it especially shocking to have read of your recent proposed acquisition and the impact it will have on our tangible book value per share," Nevada hedge fund manager David Harvey wrote in an Aug. 5 letter to Markley, which Harvey filed with the Securities and Exchange Commission. "In light of our company's poor earnings history . . . we believe tangible book value per share is the only appropriate measure of accomplishment."

Millennium's book value per share, a reflection of the equity owned by each share, has barely budged in four years. Its market value last week was about $74 million, slightly less than at the beginning of the year.

Harvey warned in his letter that "to demonstrate our dissatisfaction with your leadership," his fund intended to vote against the Albemarle merger. Harvey could not be reached for comment last week.

In the weeks after the merger announcement, in June and July, Harvey's fund, Hot Creek Capital LLC, spent more than $4 million to buy 545,200 shares of Millennium, or about 6.2 percent.

But Harvey's "no" vote alone would not have sunk the merger. Holders of at least an additional 27 percent of the shares voted against issuing the new stock required by the merger deal -- presumably also voicing frustration over the bank's performance.

Problems in Millennium's mortgage business led to a $3.5 million loss in 2002 and to a memorandum of understanding with federal regulators. The resulting regulatory restrictions were lifted in the spring of 2004.

Millennium has grown since then, but it has not turned into a solid earner. Its loan portfolio grew 5 percent in the nine months ended Sept. 30, while most of the portfolios of competitors of similar size grew 7 percent to 10 percent during the same period, according to Federal Deposit Insurance Corp. data. All of Millennium's growth came in commercial real estate and construction loans. Every other category of loan on its balance sheet, such as business and consumer loans, fell.

Millennium relies heavily on wholesale deposits, usually institutional money placed through brokers looking for high-rate certificates of deposit. Those brokered deposits, which are usually less than a year in duration, are subject to short-term interest rate swings. With short-term rates heading up, costs on one side of Millennium's balance sheet increased without raising income on the other side. The squeeze resulted in an 18 percent plunge in earnings in the third quarter, to $518,000.

It cost Millennium 85 cents to book each dollar of revenue in the first nine months of the year, compared with an average of 62 cents for all banks its size, according to the FDIC. Its return on equity during that period was 6.8 percent, compared with 13.4 percent for its peers.

Shull said Millennium will stick to its knitting in the year ahead as it tries to build its local deposits, which are cheaper and longer-lasting than brokered deposits. Millennium also is trying to increase its commercial loan portfolio. "In 2006, we're extremely focused on the bottom line, on return on equity and on shareholder returns," Shull said.

Danielson said Millennium is unlikely to be an acquisition target because it has yet to fully deploy the capital it raised in a $30 million secondary offering last year. Until it improves its balance sheet more and earns more profit, shareholders wouldn't get the full value of their investments, he said.

Albemarle, however, has more choices. It had six other bidders besides Millennium, according to SEC documents. The profitable bank said it continues to explore "alternatives to increasing shareholder value."

"We're going to be looking at all of our options for the future," Boyd said.

Terence O'Hara can be e-mailed at oharat@washpost.com.