Maryland banks can charge interest on credit card balances as soon as customers make a purchase, rather than providing a 25-day grace period as state law now requires, a Baltimore judge has ruled.

The decision by circuit court judge Marshall A. Levin came as an extension of his ruling last winter that state and national banks in Maryland can charge up to 33 percent interest on the first $500 of their credit card balance - almost twice the interest ceiling enacted by the legislature in 1980.

The state will appeal the judge's decision, and a spokesman for the six banks that brought the interest-rate suit said yesterday the banks have made a "gentleman's agreement" not to raise their credit card interest rates or do away with the 25-day "free ride" until that appeal is complete. Assistant Attorney General Eleanor Carey said that she will seek a speedy appeal to the state's highest court since the issue is "of extreme importance to the state of Maryland."

Levin's ruling appears likely to renew political debate in Maryland over who controls the banks -- state lawmakers or the courts. State legislators in 1980 passed a law setting the maximum interest rates on all unpaid credit card balances at 18 percent for the first $700 and 12 percent for amounts over $700. Maryland retail credit laws also allow buyers 25 days to pay their credit card bills before interest charges begin.

Levin ruled that U.S. banking law and recent U.S. court rulings allow state and national banks to charge the same rates as the "most favored lender" in the state -- in this case small loan companies, which are allowed under Maryland law to charge 33 percent interest on the first $500 of a loan.

Levin's ruling applied only to credit cards issued by banks, not to those issued by department stores, American Express or Diners Club.

In the opinion issued Wednesday, Levin added that banks must abide by state laws regulating small loan companies if the banks choose to charge small loan rates. This would allow the banks to do away with the present "free ride" for credit card customers who pay their bills within 25 days. As a result, banks could "realize a near doubling of credit card income."

Several restrictions in Maryland's small loan company laws would then apply to the banks, Levin ruled. Small loan companies must charge interest on the declining balance of a loan rather than average daily balance.Levin noted that a customer who borrowed $500 for 30 months would have to pay only $240.70 in interest on the declining balance, as opposed to $412.50 on the average daily balance.