CHARLOTTE, N.C. — The U.S. Treasury Department is investigating whether Bank of America, Wells Fargo and eight other major banks may have illegally foreclosed on 4,500 active-duty servicemen and -women.

Bank of America has agreed to review more than 2,400 foreclosures of homeowners who indicated they were eligible for relief under a federal law called the Servicemembers Civil Relief Act, according to the Treasury’s Office of the Comptroller of the Currency.

Wells Fargo has agreed to review 871 foreclosures of homeowners who indicated they were eligible under the act. The law is intended to postpone or suspend certain civil obligations to allow active-duty service members to devote their full attention to their military duty.

The other banks being investigated are Aurora Bank, Citibank, EverBank, HSBC, MetLife Bank, OneWest, Sovereign and U.S. Bank.

Rep. Brad Miller, D-N.C., called the alleged improper foreclosures a “flagrant disregard for a law that has been on the books continuously since the first World War.”

“If you’re wearing the nation’s uniform, if you’re deployed in harm’s way in service of your country, you should be able to focus your entire energy to our nation’s service without worrying what’s happening in a courthouse back home,” Miller said.

The review is part of a larger examination that the Office of the Comptroller of the Currency is conducting on 4 million borrowers who may have been improperly foreclosed on in 2009 and 2010.

Bank of America spokesman Rick Simon said it’s unlikely that there will be a large number of improper foreclosures from the broad population of 2,400 loans identified in the initial process.

“And if any are found, we will pay compensation, as we are doing in the 157 cases identified in the settlement with (the Department of Justice),” he said.

“These foreclosure actions will be reviewed by our independent consultant to determine if there was financial injury due to service error and, if so, the borrower may be eligible for compensation or other remediation,” said Tom Goyda, a spokesman for Wells Fargo.

Bank of America officials said the bank is building up programs to provide more support for military customers that would exceed the requirements imposed by the service members act.

“We work hard to ensure our military customers receive high-quality service that caters to their unique needs,” Simon said. “When we find mistakes, we address them.”