The Patent and Trademark Office, one of the first federal agencies to leave the District more than 30 years ago, wants to sign the largest federal government office lease ever and move its 7,000 employees to new headquarters in Alexandria, the federal government announced yesterday.

The patent agency hopes to move to a cluster of buildings that will be constructed for it in the mixed-use Carlyle development near the King Street Metro station.

The Carlyle site beat out two other finalists: another Alexandria site near the Eisenhower Avenue Metro station, and a mix of new and renovated buildings in Arlington's Crystal City.

The new buildings would add up to about 2 million square feet, about the same amount of office space as the massive Ronald Reagan federal building downtown. The lease would be worth $1.2 billion over 20 years to the developer, LCOR Inc., a Pennsylvania firm long active in local real estate.

The relocation, however, is tangled in a lawsuit brought by unhappy neighbors and the agency's current landlord. The suit challenges the 2 1/2-year process used to search for a site.

According to the suit, the government improperly addressed traffic and other environmental impacts of the move. Neighborhood groups also say that the patent agency plan would violate local planning and zoning rules.

Because of the environmental suit, the General Services Administration, the government's real estate agency, said there's no timetable yet for the move.

The patent agency's headquarters search has also drawn criticism from some members of Congress and activist groups, including the National Taxpayers Union, which have called the project one of the government's biggest white elephants.

The judge handling the case in U.S. District Court in Washington has told the federal government that it cannot make an official lease award until legal issues are resolved, which is likely to happen in August or September. Even then, it is expected to take several years to obtain all local approvals and construct the buildings.

GSA said the Carlyle site was picked because it had the lowest price and the highest rating on technical considerations such as design.

LCOR's proposal calls for five office buildings, one of them as tall as 18 stories, plus two parking garages.

The complex has been designed by Skidmore, Owings and Merrill, a renowned New York architectural firm whose local projects include the recent expansion of Dulles International Airport's main terminal and the Student Loan Marketing Association's Reston headquarters.

Alexandria city officials rejoiced over the selection of Carlyle, proclaiming it "one of the largest economic windfalls in the City of Alexandria's 250-year history" and estimating that it will generate $6.4 million annually in tax revenue.

"We're really happy about it. We worked for almost three years to attract the Patent and Trademark Office here. It's long been a citywide priority," said Mayor Kerry J. Donley (D).

But some Alexandria residents who live near the proposed headquarters were less than happy. "It brings nothing to the community," said Don Young, one of the Carlyle residents who brought the environmental suit. "It closes off our street, it ruins our retail main street, and it changes the whole mix of the community."

The patent agency is currently the largest tenant in Crystal City, an office market that is also losing thousands of Navy jobs in relocations to Maryland and the District. The patent agency occupies 18 buildings in Crystal City.

"It's certainly disappointing, if in fact they do leave," said Paul F. Ferguson (D), chairman of the Arlington County Board.

The patent agency was one of the first federal civilian agencies to leave the District for the suburbs in the 1960s. At the time, before Washingtonians ever dreamed of one-hour commutes, Crystal City was considered remote. "People just don't like it out here," one patent agency employee told The Washington Post in 1969. "It's too far out."

Ferguson said there could be a bright side to losing the agency.

"Assuming they do leave, we would try to look at it as an opportunity to get a big-name business in that spot," he said.

The Charles E. Smith Cos., the patent agency's landlord and the developer of Crystal City, has tried a number of legal gambits over the last three years to retain the agency.

Throughout the headquarters search, the company has said that the process was stacked against it and in favor of new construction.

"This is not unexpected," said Smith executive Scott Sterling. "It is what we have thought they were planning on doing, which is moving to new construction."

Sterling said Smith is not ready to concede that it has lost the patent agency. "We'll wait and see what happens. There are a couple things to occur yet," he said.

Despite the effort and money Smith has put into fighting the move, Sterling, too, looked for an optimistic interpretation. "I think it is an opportunity, perhaps one that we would rather not see at this point, but it is a chance to invent Crystal City in another way, to go out and solicit new users and refill the space as best we are able to do."