Bank of America Corp. (NYSE: BAC) fraudulently sought to limit homeowners' ability to take advantage of a federal mortgage-modification program, to avoid millions of dollars in losses, according to a federal whistleblower complaint that originated with a former bank employee.

The complaint, filed Feb. 9 by federal prosecutors with the U.S. District Court for the Eastern District of New York and unsealed Wednesday, contends that Bank of America deliberately sought to circumvent its obligations under the Home Affordable Modification Program, or HAMP.

The complaint originated with Gregory Mackler of Longmont, Colo., who claims he observed Bank of America committing fraud while working for its Urban Lending Solutions unit. While at Urban Lending, which was contracted to handle some of the bank's HAMP business, Mackler allegedly witnessed fraud committed while working with Bank of America executives.

Mackler observed fraud being committed by Bank of America from April 2010 until March 17, 2011, when he was terminated over his objections to the practices, the complaint alleges.

A successful whistleblower stands to earn up to 25 percent of any settlement amount in a federal case.

"Simply put, BoA has made a mockery of a program designed by Congress and the Treasury Department to help millions of struggling American homeowners," the complaint says. "Incentive payments and any other payments to BoA under the terms of its Agreement have been obtained, and are retained, through fraud."

"Knowing that every successful HAMP modification for a homeowner would negatively impact its bottom line, BoA never entered into the Agreement in good faith," the document adds.

Bank of America deliberately permitted some HAMP mortgage modifications so as to deflect government action but simultaneously sought to "force down the number of successful HAMP modifications ... by deliberately and unlawfully denying scores of otherwise qualified homeowners the ability to successfully qualify for HAMP modifications, while lying to those homeowners persistent enough to escalate complaints to the regulatory bodies," the complaint alleges.

Moreover, Bank of America sought to force qualified homeowners outside of the HAMP process so as to ultimately profit from foreclosure proceedings or costlier proprietary mortgage modifications, the complaint continues.

The complaint contends that Bank of America carried out foreclosure actions while homeowners were reviewed for HAMP eligibility and failed to credit homeowners' HAMP payments, among other misdeeds.

Bank of America also created a fraudulent repository of homeowner HAMP documentation, sought to deceive homeowners who complained about the handling of HAMP submissions, forced homeowners to wait for extended periods of time for receiving HAMP eligibility determinations and deliberately failed to communicate deadlines, incomplete records, modification statuses and other eligibility issues, the complaint alleges.

Neither prosecutors in the U.S. Attorney's Office nor Bank of America representatives were immediately available to comment.