BANGKOK — A major hospital in Bangkok evacuated hundreds of its patients on Friday and shut down all but emergency services after scores of antigovernment protesters pushed their way inside and roamed the halls in what they said was a hunt for soldiers who might be hiding there.

The men, who have been camping nearby, withdrew empty-handed, and protest leaders quickly apologized, distancing themselves from the raid, which was an embarrassment to a movement that portrays itself as nonviolent.

Dr. Adisorn Patradul, director of King Chulalongkorn Memorial Hospital, said almost all of its 500 patients were either discharged or transferred to other hospitals. By evening, the hospital was dark and silent except for one emergency room.

“On behalf of all leaders, I apologize to the public and to Chulalongkorn Hospital,” said Weng Tojirakarn, a protest leader who is a doctor. “The situation got out of control. It is not our policy to obstruct hospital operations.”