A nonprofit Arlington housing group bought a section of the Lee Gardens apartment complex yesterday in an agreement that will set aside 200 units for tenants with low or moderate incomes.

The developer, the Artery Organization of Bethesda, sold the 364-unit north section of the 961-unit complex to the Arlington Housing Corp. for $18.2 million, said Daniel R. Mackesey, a vice president and spokesman for Artery.

Artery also agreed to contribute $1 million to the nonprofit housing group to go toward the purchase price, Mackesey said. Arlington Housing Corp. will own and operate North Lee Gardens.

The sale was completed only hours after a lawsuit brought by some Lee Gardens tenants alleging housing discrimination was settled. Under the terms of the settlement, which was reached about 12:30 a.m. yesterday, 14 plaintiffs will share $33,000 to be paid by Artery, said John Wall, an attorney for Northern Virginia Legal Aid who represents the tenants.

The money is intended to offset the tenants' cost of moving and will be divided using a complex formula based on the tenants' apartment size and the percentage of income used for rent, said Wall.

In return, the tenants agreed to drop their pursuit of the case. The suit was dismissed by a federal judge in April but the tenants had appealed to the U.S. Court of Appeals, which was due to hear the case next week.

The World War II vintage Lee Gardens complex, off Rte. 50 across from Fort Meyer, is undergoing an expensive renovation, a process expected to displace about 3,000 mostly low-income, Hispanic residents.

Financing for the purchase is being provided by the state-chartered Virginia Housing Development Authority, which in July agreed to issue $33.6 million in bonds to go toward the purchase of the units, renovations and a contingency fund.

Renovating North Lee Gardens is expected to cost about $10 million, said Lou Ann Frederick, executive director of the Arlington Housing Corp. About $5 million is being set aside as a contingency fund, she said.

After the renovations are completed next year, 200 of the 364 units will be reserved for those qualifying for federal rent subsidies. The rest will be rented at market rates.

Under federal housing rules, tenants who lived in North Lee Gardens have first priority for the subsidized units, a requirement that has upset some tenants who live in the south part of the complex.

"There are plenty of hard feelings," said David Weiss, a plaintiff in the suit who lives in the south part of Lee Gardens.

The agreement was signed yesterday before an audience of corporate donors and county officials at an annual breakfast given by the Arlington Housing Corp.

"We are delighted {the sale} is going forward," said Mackesey, who praised the cooperation from state, federal and local officials in facilitating the agreement.

The southern part of the complex, which has 597 units, is being retained by Artery and has been renamed Sheffield Court. Tenants still remain in 130 units that have yet to be renovated. They have been given until the end of January 1988 to leave, Mackesey said.