D.C. Superior Court Judge Eugene Hamilton issued a preliminary injunction yesterday preventing the Metropolitan Washington YMCA from selling or disposing of the historic Anthony Bowen YMCA in the Shaw area until a suit concerning the Bowen Y is settled.

Hamilton ruled in favor of a group of 10 Shaw community activists who are charging the YMCA violated a 1906 trust agreement by allowing the Bowen Y to deteriorate and finally close last February.

"We're very pleased and we think the injunction was called for," said Alan Raywid, an attorney for the Shaw group. Charles L. Wilkes, an attorney for the Metropolitan Y, said he had no comment.

In a hearing before Hamilton on the injunction, the YMCA argued that its president and board of directors did not know about the 1906 trust agreement before deciding to close the Bowen Y.

Oil magnate John D. Rockefeller had set up the $25,000 trust in 1906 to establish the first black YMCA in the nation. The money was given to the YMCA with the stipulation that it be used to open and maintain such a facility.

The Shaw group sued the Metropolitan YMCA on Aug. 23, claiming that the trust was violated and that YMCA officials misspent money earmarked for the Bowen Y.