One of West Germany's largest supermarket chains yesterday revealed plans to buy what amounts to controlling interest in The Great Atlantic & Pacific Tea Co. and to bolster the troubled A&P with cash and management help.

The Tengelmann Group, a $3-billion-a-year, 2,000-store, privately owned business, agreed to pay up to $78 million for up to 42 percent of the stock of A&P.

Henry W. Van Baalen, who negotiated the agreement for Tengelmann, said the stock would be purchased from four heirs of A&P's founder, John Huntington Harford.

About 10.4 million of A&P's 24.9 million shares -- enough to effectively control management of the company -- are owned by the John Hartford Foundation, the McIntosh Foundation and two individuals, Josephine Bryce and Rachael Carpenter.

Tengelmann has agreed to purchase 70 percent of those shares for $7 3/8 cash per share and to pay $1.4 million for a one-year option to buy the remaining 30 percent for $7.50 per share, Van Baalen said. The stock closed yesterday at $6 7/8.

If the Federal Trade Commission and Department of Justice approve the sale, A&P will become the second major supermarket group controlled by foreign investors. Grand Union's principal stockholder is Cavenham Ltd., a British firm.

The purchase of its largest single block of stock by Tengelmann was welcomed by A&P Chairman Jonathan L. Scott as an "expression of investor confidence" that "should prove beneficial to our company in its redevelopment program."

A&P is America's second largest supermarket chain -- after Safeway -- with sales of $7.3 billion in fiscal 1977. Despite its volume A&P earned only $3.2 million profits in 1977 and in the first nine months of 1978 lost $15.3 million on sales of $5.6 billion.

Tengelmann is barely half that size but is "highly profitable," Van Baalen said -- profitable enough to use its own cash to buy the A&P stock and to invest additional money in the company if necessary.

Tengelmann's announcement said the company "would take an active role" in the managment of A&P, and Van Baalen suggested that role is likely to be played by Erivan Haub, the 46-year-old chief executive of the company, which is owned by his family.

In 25 years, Haub built the firm -- founded in the 1880s -- into one of Germany's largest food merchants, with headquarters in Mulheim an der Ruhr and stores throughout West Germany and Austria.

The Tengelmann group operates stores ranging from limited selection discount outlets to 60,000-square-foot markets under the names Tengelmann, Kaiser, Plus, Grosso and Lowa.

Van Baalen said he was hired to scout American supermarket companies for a possible acquisition for Tengelmann and "looked at quite a number of operations" before making the deal with A&P.

No talks have been held with A&P's management, he said, but there are no present plans to reshuffle the company's hierarchy.

As for Scott -- who was installed as chief executive by the Hartford group -- the purshase "means John Scott will have some strong support," added Van Baalen.

The A&P chief executive had been under pressure lately because his four-year effort to improve the chain's profits has not succeeded.

A&P operations bouyed after Scott took over in 1974 and cleaned house -- closing 1,433 stores, shutting down food processing and packing plants and reorganizing the company's executive structure not once but twice.

After A&P earned $23.8 million profit in 1976, the bottom line fell to $4.8 million the following year and the ink turned red in the first half of 1978. A&p/ returned to the black in the third quarter, posting a $1.5 million (6 cents per share) profit on sales of $1.6 billion.

Even after closing its unprofitable and lowvolume stores, A&P is plagued by units with sales that lag behind the industry average and by administrative expenses nearly twice as high -- as a percentage of sales -- as other supermarkets.

Acknowledging A&P's problems, Van Baalen said the chain was "the kind of opportunity we were looking for."

The $78 million price tag for control of a $6 billion business reflects the weakness of the chain's balance sheet: Outside of its store leases and inventories, A&P has few assets to offer a buyer.

The Tengelmann Group spokesman said there are no plans to buy more shares than those owned by the Hartford heirs. The shares the company has offered to purchase and has options to purchase are not a majority of A&P's common stock, but are such a large block that the Hartford interests dominate the company's management and board of directors.

Van Baalen said Tengelmann expects soon to file notice of its plans with the Securities and Exchange Commission and with the Federal Trade Commission. Under the Hart-Scott-Rodino Act passed in 1977, government agencies must be given notice of any proposed takeover in key industries so they can be reviewed for antitrust law violations.

Because Tengelmann has no other businesses in the United States and will strengthen the competitive position of A&P, no opposition to the purchase on antitrust grounds is anticipated, Van Baalen added. The purchase of the stock could be completed in 60 days, he estimated.

One of the stock sellers, the McIntosh Foundation, would retain 500,000 of the 1.3 million A&P shares it owns, but the other sellers are disposing of all their A&P stock.