The House of Representatives passed bipartisan legislation Wednesday that would ensure that non-bank financial firms are allowed to charge high interest rates on certain loans, a measure that supporters said was necessary to support the firms and provide credit to low-income borrowers.

Critics described the bill as a way to allow companies to skirt state laws and charge usurious rates, freeing the hands of payday lenders and others.

The bill, the Protecting Consumers' Access to Credit Act of 2017, passed 245-171. The bill was written by House Financial Services Committee member Patrick McHenry, a North Carolina Republican, and co-sponsored by two Democrats: Gregory Meeks of New York and Gwen Moore of Wisconsin.

McHenry said his bill's "passage marks an important step towards modernizing our financial system and ensuring financial inclusion for all Americans."

The legislation would revise federal banking laws to affirm the legal precedent that a loan that is made legally by a national bank cannot subsequently become illegal if sold to another party such as a debt collector or fintech lender, such as in the case that the loan ran afoul of state usury laws.

Lawmakers were prompted to act by a 2015 federal court ruling, Madden v. Midland, in which the judge ruled against a debt collector charging an interest rate of 27 percent on credit card debt purchased from a bank. The legal limit in New York is 25 percent.

The bill’s sponsors argued that non-bank lenders need certainty regarding the legal status of such loans to provide credit to low-income borrowers and that the Madden decision has resulted in a loss of access to credit in the 2nd Circuit where the decision applies.

"We cannot continue to allow Washington red tape and the 2nd Circuit to cut off credit to hard-working families," said House Financial Services Committee Chairman Jeb Hensarling, R-Texas, speaking on the House floor in favor of the bill.

Democratic opponents warned that it would result in a proliferation of usurious loans.

Rep. Ro Khanna, D-Calif., referred to Shakespeare in criticizing the bill, saying that "we’re going to go back to the 'Merchant of Venice' when usury laws were allowed."

"There’s nothing innovative about usury," said Rep. Carolyn Maloney, D-N.Y. "This is a terrible, terrible bill."