Bank of America routinely denied qualified borrowers a chance to modify their loans to more affordable terms and paid cash bonuses to bank staffers for pushing homeowners into foreclosure, according to affidavits filed last week in a Massachusetts lawsuit.

"We were told to lie to customers," said Simone Gordon, who worked in the bank's loss mitigation department until February 2012. "Site leaders regularly told us that the more we delayed the HAMP [loan] modification process, the more fees Bank of America would collect."

In sworn testimony, six former employees describe what they saw behind the scenes of an often opaque process that has frustrated homeowners, their attorneys and housing counselors.

They describe systematic efforts to undermine the program by routinely denying loan modifications to qualified applicants, withholding reviews of completed applications, steering applicants to costlier "in-house" loans and paying bonuses to employees based on the number of new foreclosures they initiated.

The employees' sworn testimony goes a long way to explain why the government's Home Affordable Modification Program, launched in 2008 during the depths of the housing collapse, has fallen so far short of the original targets to save millions of Americans from being tossed from their homes.

Bank of America denied the allegations in the affidavits, which were filed in a Massachusetts lawsuit on behalf of dozens of BofA borrowers in 26 states.

"We continue to demonstrate our commitment to assisting customers who are at risk of foreclosure and, at best, these attorneys are painting a false picture of the bank's practices and the dedication of our employees," a spokesman said in a statement. "While we will address the declarations in more depth when we file our opposition to plaintiffs' motion next month, suffice it is to say that each of the declarations is rife with factual inaccuracies."

Since the housing crisis unfolded in 2007, BofA and other large mortgage servicers have maintained that the widespread delays in processing loan modifications largely resulted from an overwhelming and unprecedented wave of troubled loans.

But regulators have repeatedly cited lenders for mistreating borrowers trying to modify their mortgages. In April 2012, five big banks—including Bank of America—settled a sweeping complaint with 49 states and several federal regulators about their foreclosure and loan modification practices. The banks agreed to provide $26 billion in relief and adhere to a sweeping series of new rules when modifying loans.

Later this week, a monitor assigned to track the bank's practices will issue a report that's expected to cite ongoing violations of those new rules.

(Read More: Banks Slow to Clean Up the Mortgage Mess)

In their sworn testimony, the former Bank of America employees detail a series of specific company policies designed to provide as little foreclosure relief as possible.

"Based on what I observed, Bank of America was trying to prevent as many homeowners as possible from obtaining permanent HAMP loan modifications while leading the public and the government to believe that it was making efforts to comply with HAMP," said Theresa Terrelonge, a Bank of America collector until June 2010. "It was well known among managers and many employees that the overriding goal was to extend as few HAMP loan modifications to homeowners as possible."

The reason was fairly simple, according to William Wilson Jr., who worked as a manager in the company's Charlotte, N.C., headquarters, where he supervised 13 mortgage representatives working on with customers seeking HAMP loan modifications.

After stonewalling qualified borrowers seeking an affordable HAMP loan, Bank of America representatives could upsell them to a more costly "in-house" loan modification, with rates 3 points higher than the 2 percent rate available under HAMP guidelines, Wilson testified.

"The unfortunate truth is that many and possibly most of these people were entitled to a HAMP loan modification, but had little choice but to accept a more expensive and less favorable in-house modification," he said.

Courtney Scott was among the Bank of America customers who experienced repeated delays and denials for a government-sponsored modification of the mortgage on her suburban Atlanta home. The retired nurse and grandmother grew increasingly frustrated after bank representatives repeatedly requested she fill out paperwork covering the same information.

So she was surprised when the bank approved her six months later for an "in-house" modification.

"I got the [HAMP] denial in January, 2010 and then in June they came back with an in-house offer saying 'Congratulations, you've been approved for a modification,'" said Scott. "But it only lowered my payments by about $7 and some cents."

Scott turned down the offer and the bank moved to foreclose,an action she is contesting with the help of an attorney.

Scott's frustration in complying with the banks request was designed to motivate her to agree to the in-house modification according to the former Bank of America workers.

In his affidavit, Wilson said most of the information the bank repeatedly requested from homeowners was already available in multiple document review systems. Some completed applications were denied one at a time, while other borrowers were rejected en masse in a process known as "the blitz," Wilson said.

"Approximately twice a month, Bank of America would order that case managers and underwriters 'clean out' the backlog of HAMP applications by denying any file in which the financial documents were more than 60 days old," he said. "These included files in which the homeowner had provided all required financial documents."

The procedures described in the affidavits will come as no surprise to attorneys working with borrowers trying to save their homes from foreclosures, according to Max Gardner, a North Carolina bankrupctcy attorney who trains other lawyers on legal strategies to thwart foreclosure

"This policy—of dragging it out as long as we possibly can and tell [the homeowner] you didn't qualify or the mod failed or we didn't get this document or you didn't sign it in the right place or we lost this form—is consistent with what we've seen," he said.

(Read More: As Investors Return to Jumbo Mortgages, Big Banks Sell)

Beyond the policy of denying affordable loan applications, Bank of America also encouraged its employees to move loans to foreclosure—even when the process could have been prevented, according to said Erika Brown, a former bank customer service representative.

"These homeowners were eligible for loan modifications under HAMP, sent back all the required documents and made all their required payments under a trial plan," she said. "Bank of America nevertheless damaged their credit ratings by reporting them delinquent, tacked on additional charges to their loans, increased the amounts it considered as being owed and often referred these homeowners to foreclosure."