The Embassy of Peru has agreed to move its naval attache's offices out of a MacArthur Boulevard house, where their presence in violation of District zoning law touched off a dispute involving the U.S., D.C. and Peruvian governments, a local real estate company and one of its saleswomen, and sparked a lawsuit by neighborhood residents.

Under an agreement filed with the U.S. District Court this month, the Peruvians agreed to move the offices by May 17, and to obtain all the necessary government approvals for a new property, said James Murphy, D.C. deputy corporation counsel.

"The embassy agrees to promptly begin efforts to find a suitable new location for the offices of the Peruvian naval attache," according to the document. In return, the city will not "proceed with any zoning enforcement action" if the Peruvians move the offices on schedule, Murphy said.

The Peruvian government believes the agreement is "equitable and fair to all sides," said the embassy's attorney, Nick Egelanian. "We think that will be the end of the case." Egelanian said he was "not at liberty to comment" on what the embassy will do with the MacArthur Boulevard residence.

The agreement brought to a halt, at least temporarily, most of the action in a lawsuit filed in October by the MacArthur Area Citizens Association against the State Department, the District, Peru, the real estate firm of Shannon & Luchs, which handled the sale of the house to the Peruvians, and its saleswoman, Laura Astiz. The residents' group is attempting to force the Peruvian diplomatic offices out the neighborhood, which is zoned for single-family, detached homes.

The State Department, although not a party to the D.C.-Peruvian agreement, was delighted with it, according to a department attorney.

"We are extremely appreciative to the District of Columbia government and . . . to the corporation counsel's office for the effective and imaginative way they helped resolve this," said attorney Ronald Mlotek, who represents the State Department's Foreign Missions Office. "We also appreciate the willingness of the Peruvian Embassy to settle" the dispute.

Mlotek said he has "every expectation and reason to believe" the agreement will mean an end to the lawsuit for the three governments.

A decision on motions to dismiss the suit, filed by attorneys for the governments, the real estate company and Astiz, has been postponed until May by District Judge Barrington D. Parker. The judge also ordered all the parties to the suit to be back in court May 27 to discuss the status of the case at that time.

The real estate brokerage and saleswoman, and the neighborhood group will continue to pursue one portion of the case, according to an attorney familiar with the case. This is the neighborhood association's request for punitive damages from the brokerage and saleswoman in a sum "amounting to three times the total of the commissions received from their participation in the sale . . . . " A Shannon & Luchs spokesman had no comment, and the attorney for the citizens' group could not be reached.

In his order, Parker wrote that "while there appears to be substantial merit in Shannon & Luchs and Laura Astiz' motion to dismiss . . . , the court does not feel that such consideration of these defendants' motions to dismiss the action is appropriate at this time."

Peru bought the house last spring after it sought and received approval from the State Department, as required by the Foreign Missions Act. Officials in the Foreign Missions Office acknowledged that they okayed the purchase but said it was Peru's responsibility to assure that its plans for the house complied with city law. A spokesman for Peru, however, said his embassy had been told the Foreign Missions Office was "the only channel" to work through for property transactions.