Macke Co. of Washington, one of the nation's largest vending businesses, filed suit yesterday against a Baltimore bottling firm that it claims secretly and illegally purchased a large block of Macke's stock.

The suit, filed in U.S. District Court for the District of Columbia, seek to stop Allegheny Beverage Corp. from buying more Macke stock and to force Allegheny divest itself in an orderly manner of stock it already has purchased.

Macke charges that Allegheny, a Pepsi-Cola bottler in Baltimore, secretly bought 10 percent of Macke stock with the help of a Canadian brokerage firm without filing proper notices with the Securities and Exchange Commission. Allegheny already owned 4.8 percent of Macke stock, and the alleged new purchases would give it 15 percent control of the company, Macke charged in the lawsuit.

The suit alleges that Allegheny "enbarked upon an unlawful plan, scheme and course of conduct" to take over the vending firm after Macke officials last April rejected Allegheny's proposal to buy out their controlling interest in the company for $10 million.

Allegheny officials couldn't be reached for comment last night.

The Macke suit also alleges that Allegheny spread "misleading and incomplete reports" about the possibility of the takeover, tried to buy Macke shareholders' stock and established a "warehousing system" to acquire Macke stock. Macke alleges that under that system, the Canadian brokerage firm would buy and hold Macke stock and transfer it to Allegheny when it had controlling interest.

The suit also claims that Allegheny "manipulated the market in Macke stock so as to create the appearance of active and heated trading" which would pressure Macke shareholders to sell their stock at inflated prices.

According to the lawsuit, Allegheny has acquired control of 15 percent of Macke stock, making it the firm's single largest shareholder. Macke alleges that Allegheny failed to disclose this stock acquisition under law or begin a formal tender offer.

The bottler also failed to disclose to Macke shareholders that in 1975 Allegheny was enjoined by a federal judge from violating the antifraud, registration, reporting and proxy laws, the suit alleges.

Macke accused the two firms of placing orders for large blocks of Macke stock with market specialists and then canceling them at the last minute. This would lure other buyers to purchase the stock, they claimed. The Canadian firm then would acquire smaller blocks of about 2,000 to 4,000 shares at prices higher than those in the original order. In this way the two firms caused greater-than-usual market activity surrounding the stock and attracted substantial blocks of Macke stock which ordinarily wouldn't be available, Macke alleged.

To support its allegations, Macke said that both the price and volume of trading of its stock have increased drastically since the alleged scheme began about the beginning of April.

On April 1, Macke said its stock sold for $6.37 a share. The price since has risen and was $11.37 as of June 6. For the nine-week period ended March 28, the trading volume for Macke stock was about 317,000 shares, the suit alleges. In the following nine-week period ending June 6, volume had increased to 663,000 shares, according to the lawsuit.

The suit also alleges that the Canadian broker worked with Dean Witter Reynolds Inc. of New York, Burns, Pauli & Co. Inc. of St. Louis and Bache Halsey Stuart Shields Inc. of New York to acquire Macke stock.