WASHINGTON - Subsidiaries of Bank of America Corp. and Morgan Stanley will pay more than $22 million to settle allegations that the banks wrongfully foreclosed on almost 200 active-duty military-service members, the Justice Department said yesterday.

"The men and women who serve our nation in the armed forces deserve, at the very least, to know that they will not have their homes taken from them wrongfully while they are bravely putting their lives on the line on behalf of their country," said Justice Department Assistant Attorney General Thomas Perez.

According to the Justice Department, the banks went forward with foreclosure without first obtaining court orders. The agency said that the victims included military officials who "served honorably" in U.S. military actions in Iraq and Afghanistan.

As part of the deal, a Bank of America subsidiary formerly known as Countrywide Home Loan Servicing agreed to pay $20 million to resolve a lawsuit alleging that it foreclosed on about 160 service members between January 2006 and May 2009 without court orders.

In addition, Bank of America agreed to pay any active-duty military personnel found to be wrongfully foreclosed upon by the bank from June 2009 through 2010. The Justice Department's complaint alleged that Countrywide did not "consistently check the military status" of borrowers on whom it foreclosed through at least May 31, 2009.

Saxon Mortgage Services Inc., a subsidiary of Morgan Stanley, agreed to pay $2.4 million to resolve allegations that the lender foreclosed on about 17 military officials between January 2006 and June 2009 without court orders. Saxon also agreed to pay military personnel for wrongful foreclosures from July 2009 through 2010.

Also, Countrywide and Saxon will have to repair any negative credit-report entries of affected military personnel.