In a blow to one of the government’s more pointed efforts to hold individual bank officials accountable for conduct related to the mortgage meltdown, an administrative-law judge has ruled that the SEC’s charges against two former employees of State Street Bank and Trust were unfounded.

Judge Brenda P. Murray dismissed the charges in an order issued Friday.

In September 2010, the Securities and Exchange Commission alleged that John Patrick “Sean” Flannery, former chief investment officer at State Street Global Advisers, and James D. Hopkins, a former vice president, misled investors about the risks of a fund that was heavily invested in subprime bonds.

“The SEC is committed to identifying and holding accountable those who violated the law and harmed investors through subprime investments,” SEC Enforcement Director Robert Khuzami said in a statement at the time.

But in her Friday order, Murray, the SEC’s chief administrative-law judge, rejected a series of accusations by the SEC staff.

Neither Flannery nor Hopkins “was responsible for, or had ultimate authority over, the allegedly false and materially misleading documents at issue in this proceeding,” the judge wrote.

In addition, the letters to clients “did not contain materially false or misleading statements or omissions,” the judge found.

The ruling comes at a time when the SEC has been criticized for settling cases against big financial firms without charging senior executives.

SEC officials have said that before filing charges they weigh the risk of losing a trial. Friday’s decision illustrates the risk.

State Street previously settled with the SEC and the attorney general of Massachusetts, agreeing to pay more than $300 million to investors who lost money, the SEC said last year. State Street also agreed to pay nearly $350 million to settle private lawsuits, the SEC said.

The case against Flannery focused in part on an Aug. 14, 2007, letter he signed to investment clients at a time when subprime investments were dragging down a fund that State Street managed.

Flannery’s draft of the letter advised investors not to withdraw their money, predicting that the market would “regain its footing.”

The final version included this sentence, the second half of which was added by an in-house lawyer: “While we continue to liquidate assets for our clients when they demand it, we believe that many judicious investors will hold the positions in anticipation of greater liquidity in the months to come,” the letter said.

When the letter was sent, investors advised by State Street were already withdrawing, the SEC alleged, and investors who got out later lost more money, an expert witness called by the SEC testified.

Flannery truly believed that many judicious investors would hold their positions, and he was relying on the in-house lawyer’s advice, the judge found.

For his part, the in-house lawyer knew that one of State Street’s internal groups was advising its clients to get out of the fund, the judge wrote. The lawyer was not charged in the case.

SEC spokesman John Nester said Monday that the agency is reviewing the judge’s decision. The SEC staff can appeal to the agency’s governing commissioners.

“While we are deeply gratified by the outcome of this trial, this is a case that we believe should never have been brought against our client,” Mark W. Pearlstein, an attorney for Flannery, said in a statement. “It is unconscionable that following a long and distinguished career in the investment industry, Mr. Flannery was forced to spend several years living under a cloud while fighting these baseless allegations.”

Murray’s ruling was based in part on her assessment that the accused were credible witnesses.

“Testaments of their honesty, good character, hard work, and concern for clients, were delivered enthusiastically and were not simply pro forma statements,” the judge wrote.