Allegheny Beverage Corp. might have gained control of Macke Corp., if its purchases of Macke stock were not halted temporarily, U.S. District Court Judge John Garrett Penn said in a ruling handed down yesterday.

Penn, who Thursday issued a temporary restraining order forbidding Allegheny to buy more Macke shares, said he made that decision because Allegheny was on the verge of taking over Macke.

Allegheny, a Baltimore company that holds the Pepsi-Cola and Dr. Pepper franchise for the Mid-Atlantic states, has been trying for several weeks to buy Macke, one of the nation's biggest vending machine operators and owners of the Family Fish House and D&F office furniture chains.

After Macke's two biggest stockholder groups refused to sell their 22 percent of the company, Allegheny began buying hundreds of thousands of shares of stock on the open market. By early this week, Allegheny had acquired 19.9 percent, or 603,700 shares, and was negotiating to buy more than 200,000 additional shares from E. F. Hutton.

The pending purchase of the Hutton block, which would make Allegheny the biggest investor in Macke, was one of the reasons for issuing the temporary restraining order, Penn said in the written decision memo filed in federal court yesterday.

"If successful in purchasing the 200,000 to 300,000 shares held by Hutton, ABC will have acquired the controlling interest," Penn noted.

He said there is "substantial evidence that ABC intends to obtain control" of Macke without complying with federal securities laws governing corporate takeovers.

Allegheny Beverage's buying of Macke stock has "undoubtedly subjected plaintiff's (Macke) shareholders to pressure to sell their shares," the judge said in explaining why he issued the order.

Macke and Allegheny have been battling in court for several days, and Penn earlier had scheduled a hearing on the case for next Tuesday. Penn said he stopped the buying before then because by Tuesday Allegheny might have control of Macke already. The Tuesday hearing now will be to determine whether an injunction will be granted to extend the ban on further purchases by Allegheny.