The Justice Department rushed yesterday to the aid of an unlikely landlord -- the East German government -- which is caught in a very American situation -- a fight with a local tax collector.

In a lawsuit filed in federal court, the department sought to stop Arlington County officials from foreclosing on an apartment building that the East Germans use to house embassy personnel.

The country purchased the building four years ago and, to the disgust of county officials, has refused to pay any real estate taxes on it since then on the grounds of diplomatic immunity.

Two years ago Arlington took the issue to court and won a judgment against the Germans from a federal judge who said that the 30-unit Windsor Park Tower is subject of local taxes under a 976 federal law. The county, however, has been unable to collect the judgement which totals about $26000, and has initiated proceedings to auction the building to cover the back taxes and penalties.

U.S. District Judge Albert V. Bryan Jr. held then that, under the 1976 Foreign Sovereign Immunities Act, the Germans must pay the real estate taxes because the building is operated as an apartment complex and not as an integral part of the country's embassy, which is immune from local taxes. a

The Justice Department yesterday sided with the East Germans, arguing that the apartment building at 1515 S. Arlington Ridge Rd. is immune from taxes under international law and a 1974 agreement between the United States and East Germany governing their diplomatic relations.

In its suit, the Justice Department maintained that taxing property used for diplomatic purposes could "expose the United States and its employes to embarrassment in their dealings with foreign governments."

Arlington Treasurer Bennie L. Fletcher Jr., who was named in the Justice Department suit, would not comment on the latest legal skirmish. "We haven't been served with the papers yet," he said.

The East German government purchased the eight-story condomnium for $1.6 million in July 1976. The building, which has been completed just a year earlier, and had never been lived in, came with wall-to-wall carpeting, enclosed parking, a swimming pool and recreation rooms.

Arlington is expected to answer yesterday's suit within a month.