Cayer said the government fell short of demonstrating that any false statements the bank may have made were material, or that the governing law covered the securities sales.
Less than two hours later, the Justice Department filed court papers saying it plans to object to Cayer's findings.
The lawsuit, which sought civil penalties, was a product of President Obama's Residential Mortgage-Backed Securities Working Group, which includes the Justice Department and other federal and state regulators.
It is one of several in which the government has relied on a law adopted after the 1980s savings and loan scandals, the Financial Institutions Reform, Recovery and Enforcement Act, to punish alleged misconduct causing the financial crisis.
That law has a 10-year statute of limitations, double the usual length in securities fraud cases, which the government took advantage of when it sued Bank of America last August over alleged misconduct dating from early 2008.
Bank of America was accused of misleading Wachovia, now owned by Wells Fargo, and the Federal Home Loan Bank of San Francisco about risks in the $855 million offering, from which they bought about 98 percent of the securities.
While the securities were backed by 1,191 seemingly safe "jumbo" adjustable-rate mortgages, the government said more than 40 percent of these home loans did not comply with Bank of America's underwriting standards.
The government claimed civil penalties under FIRREA based on the bank's alleged violations of laws to fight fraud in "loan and credit applications" and prohibit various false statements.
Cayer, however, said the first law has been applied "consistently" to "traditional customer related bank activities such as loans," and thus did not cover securities purchases.