The City of Alexandria has agreed to allow a controversial scrapyard to remain at its present location near a Metro station until 1992, ending a court fight over the city's efforts to force the yard elsewhere.

The Alexandria City Council voted earlier this year to revoke the yard's permit in 1985, saying that its Cameron Valley location near the Capital Beltway was an eyesore and too valuable to be used as a junkyard.

But the Alexandria Scrap Corp. fought back with a barage of press releases and a lawsuit, arguing that the city was trying to kill a 50-year-old business and put its 50 employes out of work. It obtained a temporary court order in late March blocking city officials from giving the yard only four more years at a site that city officials have said should be developed as a high-rise office complex.

City and scrapyard officials said yesterday they have resolved a lawsuit over the yard's future, agreeing to allow the yard to remain, but under strict new rules.

Under the agreement, the scrap company will have to limit the heights of scrap piled in the yard.

City Councilman Donald Casey said yesterday the city never intended to force the yard out of business, but wanted only to enforce city regulations the yard had violated. "I never believed that" the yard would close, Casey said.