WASHINGTON — It's an end of an era for the thousands of college students who rely on MasterCard or Visa to get them through tight times.

Under a new law awaiting President Barack Obama's signature, credit card companies will be prohibited from giving cards to people under 21 unless they can prove they have the means to repay the debt or a parent or guardian co-signs for the loan.

Congress passed the bill this week, and Obama was expected to sign it into law Friday. The changes will go into effect in nine months.

"The hope is that when they spend, they'll spend under better terms and there'll be fewer traps for them," said Pedro de la Torre, a spokesman for Campus Progress, a progressive group in Washington that tracks issues affecting young people.

Congress is hoping to break a vicious cycle: A cardholder falls behind in paying the bill and watches helplessly as the interest rate spikes on the existing balance. Buried in higher rates and late fees, the cardholder spend less, which hurts local businesses.

College students are particularly vulnerable.

According to Campus Progress, aggressive marketing by the card companies and multimillion-dollar agreements with universities have presented young people with ample opportunities to borrow money they can't repay. College seniors with credit cards are graduating with an average balance of $4,100, a 41 percent increase in the past five years, the group says.

In addition to curbing the number of young people who can obtain a card, the legislation would set new limits on when and how banks charge fees.

For example, a customer would have to be more than 60 days behind on a payment before seeing a rate increase on an existing balance. Even then, the lender would be required to restore the previous, lower rate if the cardholder pays the minimum balance on time for six months.

Consumers also would have to receive 45 days' notice and an explanation before their interest rate was increased.

"This will allow consumers to make informed choices about how best, and whether, to use a credit card, or to shop around for better terms," House Speaker Nancy Pelosi, D-Calif., said after the House passed the bill Wednesday, 361-64.

The Senate approved the bill Tuesday, 90-5.

The banking industry opposes the changes.

"Less credit will be available generally, which means some consumers and small businesses will not be able to obtain credit cards at all, particularly younger people and startup small businesses," said Edward Yingling, president and CEO of the American Bankers Association.

A spokeswoman for Sen. Christopher Dodd, D-Conn., chairman of the Senate Banking Committee, said the provision would not be retroactive. People under 21 who already have cards would be allowed to keep them, she said.