A D.C. Superior Court judge has ruled that the owner of a Connecticut Avenue apartment must give his tenants the first opportunity to buy the building, but that he is not required to offer them the same conditions of sale as those offered to a prospective outside purchaser.

The ruling by Judge James A. Belson clarifies his finding of last week on a complaint filed by a group of tenants at 2800 Connecticut Ave., a 107-unit building. The tenants had contended that the landlord, Herbert M. Gelfand, had denied them their rights under city law when he offered them only 60 days to arrange financing before settlement, but offered a group of developers interested in buying buildings 180 days.

Lawyers for the tenants group had argued that under city law, the residents of the building had a right to "first refusal" on the property, which Belson defined as "the right to take specified property at the same price and on the same terms and conditions as those contained in a good faith offer by a third person."

Belson ruled, however, that the city Housing Act of 1977 specifies only that a right of first refusal must be granted to tenants wishing to purchase buildings of four units or fewer. Nevertheless tenants of larger buildings do have the right to negotiate for purchase "which takes precedence over any contract or negotiations with third parties."

Therefore, Belson said, Gelfand was obligated only to tell tenants that the building was for sale, give them 30 days to organize and 90 days to negotiate a sales contract with him.

Gelfand complied with all those obligations, Belson said.

D.C. City Council Chairman Arrington Dixon has said that in passing the law, the council had intended to give first refusal rights to all tenant groups. Some council members are considering amending the 1977 act to reflect that intent, Dixon said.

On a motion filed yesterday, Belson issued an order blocking the sale of the building until Oct. 2 to allow the tenants an opportunity to appeal.