MIAMI (CBSMiami) – A man who reportedly beat and sexually assaulted his girlfriend before he was captured in a massive police manhunt appeared before a judge Wednesday morning.

Wearing a Ferguson gown, usually reserved for those on suicide watch, a visibly bruised Ivan Zapata was formally denied bond. He was also ordered to stay away from his girlfriend and another woman whom he reportedly carjacked during a police pursuit.

READ MORE: 2 Doral Police Officers Injured In Shooting Near Miami-Dade Police Headquarters; Suspect Killed ID'd By Police

Zapata, 21, is accused of kidnapping, beating, burning and threatening to kill his 20-year-old girlfriend last December.   The woman claimed he held her as a virtual hostage in a southwest Dade motel room.

CLICK HERE to watch CBS4’s report

The woman said she was only able to contact the police to tell them she had been sexually assaulted after Zapata went to visit a family member.

READ MORE: Shot Doral Police Officer In Serious But Stable Condition, Second Officer Recovering

When cops went to arrest Zapata, police said, he attacked an officer and escaped.

“Once he released his handcuffs to get dressed, he viciously attacked the officer, a fight broke out between the subject and the officer in the hallway and the stairwell. He tried to remove the officer’s gun,” said Juan Pérez, Miami-Dade’s Deputy Police Director.

Authorities searched for him by air and on the ground as schools in the area went on lock down.

Zapata was captured in Hialeah Gardens.

MORE NEWS: South Florida PBA Union President Steadman Stahl On Stress Of Being A Police Officer

Zapata has a criminal history that includes a 2011 for selling marijuana on school grounds and in 2012 for child abuse, domestic violence, aggravated assault with a deadly weapon and battery.