A courtroom confrontation that could have overturned Virginia's corporate takeover disclosure law was avoided yesterday when Allied Stores Corp. and Garfinckel, Brooks Brothers, Miller & Rhoads Inc. agreed not to make the law an issue in their takeover battle.

The State Corporation Commission also signed an agreement with Allied and Garfinckel promising not to try to enforce the state law, which is meant to help Virginia companies resist unfriendly takeover attempts by requiring advance notice and in some cases a hearing before the SCC.

Allied made an uninvited offer to buy Garfinckel's last Friday and simultaneously filed a lawsuit in U.S. District Court in Richmond trying to prevent Virginia from invoking the state law.

Allied contends the state statute conflicts with federal law and asked the court to issue an injunction prohibiting the corporation commission from enforcing the law.

Judge Robert R. Merhige had scheduled a hearing for today on Allied's request for the injunction. The hearing was postponed indefinitely after yesterday's compromise.

Under the stipulation signed yesterday, Garfinckel's and the SCC agreed to give Allied 48 hours notice before "envoking, applying or enforcing" the Virginia takeover-bid disclosure law in the Allied-Garfinckel case.

The state law requires anyone trying to buy control of a Virginia business to notify the State Corporation Commission at least 20 days in advance. The SCC then can order a public hearing on the proposal, delaying the offer much longer.

Federal law, however, requires that in most cases an offer for the stock of a company must be made within at least 5 days after it is announced.

Earlier court rulings have restricted application of the state law because of the conflict with federal provisions. If Allied's lawsuit against Garfinckel's and the SEC were successful, it effectively would knock down the state law.

Garfinckel's, meanwhile, is looking for other legal tactics to block Allied's offer to buy all its common stock for $48 a share. The offer was rejected Saturday by the board of the Garfinckel corporation, which also owns the Ann Taylor and Catherine's Stout Shoppes women's-wear chain and the Miller and Harzfield department stores.

Chairman David R. Waters said the $48-a-share offer, worth a total of $207 million, is too low, based on an evaluation made last month of Garfinckel's assets. Since the takeover attempt was announced Friday, Garfinckel's stock has soared more than $18 a share, closing yesterday at $52.75 in heavy trading on the New York Stock Exchange.

To avoid a takeover by Allied, Garfinckel's also is trying to find another buyer willing to make a higher bid. If no one else is interested in buying the entire company, Waters said Garfinckel's might be willing to sell some of its divisions to keep them out of Allied's hands.