Easco Corp., a financially troubled Baltimore tool manufacturer and metals producer, has agreed to end anti-takeover litigation and to merge with a unit of Equity Group Holdings, the two companies announced yesterday.

Under terms of the agreement, all of Easco's outstanding and unissued shares of common stock will be purchased by ES Acquisition Corp. for a cash payment of $20.50 per share.

ES Acquisition is a newly formed unit of Equity, a District-based private partnership engaged in real estate and manufacturing operations.

Easco's board of directors rejected an $18.50-per share-takeover offer made by Equity last January. At the same time, Easco sued Equity in federal court in Maryland, alleging that the District company had illegally acquired 1.1 million shares of Easco's common stock.

The companies said in their joint announcement yesterday that they had agreed "to take all actions necessary to dismiss the pending litigation" between them as soon as possible.

Equity officials said that the $20.50-per-share buyout, to be accomplished in two stages, "was fair, from a financial point of view, to the stockholders of Easco Corp."

In addition to dismissal of litigation, another key part of the merger proposal calls for an amendment to the Easco charter that restricts the activities of stockholders owning more than 10 percent of the company. Equity, solely owned by brothers Steven M. Rales and Mitchell P. Rales, now holds 17.6 percent of Easco.

The charter amendment must be approved by at least 80 percent of the votes entitled to be cast by holders of the company's outstanding stock. As of May 10, Easco had 7.2 million shares outstanding. Approval also is needed from holders of two-thirds of Easco's unaffiliated stock -- defined under Maryland law as shares owned by a person who is the beneficial owner of less than 10 percent of a particular company's stock.

A spokesman for the Rales brothers said yesterday that they have a partner who owns 4.4 percent of Easco.