ANNAPOLIS -- Marylanders can't hide behind this state's laws to avoid paying gambling debts they run up at casinos in Atlantic City or Las Vegas, the state's highest court has ruled.

Maryland courts will enforce gambling debts incurred in other states when the gambling involved is legal in that state, the Court of Appeals held Monday.

State public policy is not "so strongly opposed to gambling or gambling debts" that it overrides the basic rules of contracts, the court said.

In issuing its opinion, the Court of Appeals upheld a Baltimore County judge's order that Richard E. Kramer pay Bally's Park Place of Atlantic City $6,350. Kramer had written a $5,000 check, later dishonored, to Bally's while in Atlantic City in 1981.

Kramer's attorney had argued that Maryland law would preclude enforcement of the contract, or debt, had it been entered into in Maryland.

A number of courts in other states have refused to enforce out-of-state gambling contracts, holding that to do so would violate their own states' public policies on gambling.

There are some circumstances under which Maryland courts will not enforce an out-of-state contract provision that is against Maryland public policy, the appeals court said.

But for that to happen, the court said, "the public policy must be very strong and not merely a situation in which Maryland law is different from the law of another jurisdiction."

Maryland, the court noted, is "extensively involved in the management and operation of various types of lotteries," and permits betting on horse racing and many other types of gambling, including the use of slot machines by nonprofit groups on the Eastern Shore.