At least 23 gay activists remained in jail last night as the process of releasing nearly 600 protesters arrested Tuesday at the Supreme Court stymied the courts and raised a furor among march organizers who complained of shoddy treatment of arrested AIDS patients.

Organizers said some AIDS patients who had been arrested were denied their medicine, food and water. In one case, a man with AIDS had to be carried out of the courthouse on Indiana Avenue after a doctor said he suffered from dehydration while in jail.

Three courts worked through the night Tuesday to process the 572 protesters arrested that day on the steps of the Supreme Court Building. Arraignments continued last night for the remaining 137 people who had been held overnight. By 6:30 p.m. yesterday, all of the remaining activists had been processed, a court clerk said. He did not know, however, how many protesters remained in jail.

A march organizer said last night that at least 23 had been sentenced to three days in jail or had chosen to serve that time instead of paying a $100 fine.

Some of those released complained that they were treated badly by police and U.S. marshals. Others said the delays were intentional and often threatened the health of some AIDS patients who needed medication every four hours.

However, one police spokesman said the protesters were often the source of the delays. "Some of the delays they encountered were because many of them were reluctant to cooperate," said Capt. William White III.

Police said 112 of the 137 people held overnight had to be processed twice because they removed wristbands that identify prisoners. "The glaring fact is that 112 of them took off their namebands in a mockery of the court system," White said.

Nearly 600 protesters were arrested Tuesday morning on the steps of the Supreme Court Building and charged with a public space violation, a misdemeanor punishable by up to a $100 fine and 60 days in jail. One police spokeswoman said the arrests were the largest number of arrests ever at the court. The protesters were demonstrating against discrimination based on sexual preference.

White commended officers in his department. "Any time you take nearly 600 people into custody over a five-hour period, you're going to have inherent problems in the system," he said. He pointed out that police had processed the activists and had each of them ready for a court appearance by 8:30 p.m. Tuesday.

Some march organizers said bureaucratic tie-ups and miscommunication threatened the well-being of some arrested AIDS patients.

"The {D.C. Public} Health Department worked well with us at the site and behind police lines," said Michelle Crone, a march organizer. But problems arose as prisoners waited up to eight hours on buses and while they awaited arraignment in the D.C. Superior Court Building, she said.

One AIDS patient from Sacramento, Calif., who asked not to be identified, told of a harrowing night in custody. He said that because the AIDS virus is attacking his brain and central nervous system, he is easily confused.

He said he became separated from the partner he was paired off with by organizers to help him while in jail and spent the rest of the day and night in a state of confusion.

Apparently, police mistook this for a lack of cooperation, he said. The AIDS patient said that he was dragged to a bus and thrown on the floor while handcuffed. With the help of others in the bus, he was able to sit upright.

When it came time to take his medication -- usually every four hours -- the AIDS patient said no one was around to give it to him. Once, another handcuffed activist reached into the man's pocket to get the medicine, the patient said. When a tablet fell to the floor of the bus, the man said he had to lie on the floor to lick up the tablet.

Dr. Reed V. Tuckson, commissioner of public health, said AIDS patients were warned of potential problems before being arrested.