A D.C. Superior Court judge agreed yesterday to extend a ban prohibiting demonstrators from occupying the Islamic Center Mosque on Massachusetts Avenue NW, while workmen repair the building, part of which was damaged last May in a firebombing.

Judge William E. Stewart Jr. acted after lawyers for the Islamic Center and the demonstrators said there had been no resolution to a three-week-old dispute stemming from a decision by the center's Board of Governors to close the building for the repairs.

The dispute began on Oct. 18 when the Board of Governors announced that the center would be closed for the work, which was scheduled to begin three days later, according to a court affidavit signed by the acting director of the center, Mostafa Elbalghiti. The notice indicated four locations in this area where Islamic activities would be held.

According to the court papers, about a dozen persons occupied the building and have since refused to leave. All repair work has been blocked.

Stewart ruled on Oct. 26 that the demonstrators had trespassed and ordered them to end the protest. Several demonstrators have continued to occupy the building, according to center attorney, Cherif Sedky.

A further hearing was scheduled for Nov. 13.