TERRORIST HAMAAS KHAALIS could have stayed out of jail if he had honored the agreement under which he and his band released their 134 hostages three weeks ago in return for a police promise to let him await trial at his 16th Street home. But he broke the agreement. One condition he had accepted was that he would do nothing that could lead to his arrest on other charges. He did something: In phone conversations legally intercepted, he threatened murder. Given his demonstrated capacity for violence, his threats could not be ignored. In addition, as federal searches proved, members of his Hanafi Moslem sect had stockpiled weapons at several Washington-area homes, and some Hanafis had disappeared from police view. So on Thursday Mr. Khaalis was locked up. Also arrested, but offered bond, was his son-in-law, who was not one of the original terrorists and who was arrested on a gun charge.

Members of the Washington community who had challenged the wisdom of honoring the crisis promise to release Mr. Khaalis, and the need to do so, will doubtless feel reassured that he is off the streets. As it happens, the three other Hanafis released at the time -- released for bail-act considerations, not in a deal with the police -- have also since been locked up. This happened after a judge heard new testimony implicating the three directly in injuries done to hostages at the Islamic Center. All 12 terrorists are now in jail.

No less important that the safety and peace of mind of the community in this instance, however, is the fact that the authorities appear to have played every part of the hostage-release understanding straight. They kept Mr. Khaalis under close watch on 16th Street and, when he violated a condition of his freedom, they acted promptly and coolly and legally and within the terms of their promises to him. The Hanafi leader has no grounds that we can see for complaining that he has been treated unfairly or wrongly. Least of all can it be correctly said, as Mrs. Khaalis, for one, is bitterly saying, that he was locked up because of his religion.

The more we see of how the Washington police and the federal authorities have acted in and after the Hanafi seige, the more respect for their performance we feel.