Marks & Spencer PLC's announcement that it plans to buy Brooks Brothers ends a long search by Britain's most successful retailer for a major U.S. outlet.

Toronto-based Campeau Corp. agreed in principle last week to sell Marks and Spencer - the Brooks Brothers division of its Allied Stores Corp. unit - for $770 million. However, Allied would not be required to sell Brooks Brothers unless it successfully acquires Federated Department Stores Inc.Cincinnati-based Federated is the fifth-largest U.S. retailer. Campeau said the proceeds of the Brooks Brothers sale will go into financing its acquisition of Federated.

Everyone in Britain, from royalty downward, shops at Marks and Spencer, which has established a formidable reputation for quality merchandise at affordable prices.

The group has nearly 300 stores in prestigious locations across the United Kingdom, but has plotted its overseas expansion carefully and cautiously.

M&S has opened 11 stores in Ireland and continental Europe, including three in Paris, and is well established in Canada where it has 262 stores trading under the names of Marks and Spencer and D'Allaird's. Four D'Allaird's stores selling ladies fashions are also located in upstate New York.

Marks and Spencer has been looking for expansion opportunities in the United States for some time.

The $770 million bid for Brooks Brothers represents the latest stage of a massive spending spree in the United States by British companies over the past couple of years. In 1987 alone, there were some 256 acquisitions worth around $27 billion, making the United Kingdom the biggest foreign investor in the United States.

Although the United States is also the largest investor in Britain - with direct investments of more than $34 billion at the end of 1985 - there has been nothing corresponding to the recent scale of British takeover activity in the United States, largely because of the dollar's weakness.

M&S, which posted a pretax profit of 432 million ($760 million) in 1986-87, accounts for over 16 percent of the total clothing market in Britain and nearly 5 percent of all food sales. Recently, the group has expanded into home furnishings and household goods, furniture and financial services.