WATCH: Oregon murder suspect escapes courthouse in wild security video

Courthouse surveillance video shows an Oregon murder suspect sprinting away from bailiffs after they unshackled him in court — a requirement under state law — then escaping the building and prompting a massive manhunt.

Edi Villalobos Jr., a 28-year-old accused of murder and a slew of other felonies, was supposed to stand before the court for the start of his trial. Instead, he ran down the hallway and out an employees-only exit, video shows.

"Per Oregon law, the deputies removed all restraints from Villalobos during the jury selection process," the Washington County Sheriff's Office said in a statement. "At around 11 a.m., the court took a break, and restraints were placed back on Villalobos. When the break ended, deputies again removed all restraints from Villalobos, as directed by Oregon Law."

The incident happened on Feb. 28, but the sheriff's office made the video public Thursday.

Edi-Villalobos.jpg

Edi Villalobos, shown here in 2021, attempted to elude authorities after escaping the Washington County Courthouse in Hillsboro, Oregon, police say. (Washington County Sheriff's Office)

After a roughly two-hour manhunt, police arrested him in a Hillsboro apartment, where a neighbor called 911 to report they heard someone trying to break in, according to the sheriff's office.

"Deputies entered the apartment and located Villalobos hiding in a closet underneath a blanket," the sheriff said.

RELATED: Oregon murder suspect found hiding under blanket in closet after escaping courthouse

While in custody awaiting his murder trial, Villalobos racked up charges for unlawful possession of a weapon by an inmate and distributing contraband, court records show.

SECURITY-CLIPS-WITH-BLUR-TRACKING-022723.00_01_41_28.Still001.jpg

Video shows the suspect, identified as Edi Villalobos Jr., running from deputies after they unshackled him in the courtroom. (Washington County Sheriff's Office)

Now he faces two new felony burglary charges and another for escaping custody.

READ ALSO: Stunning video shows Coast Guard rescue man wanted in bizarre 'Goonies' fish incident

Villalobos is due back in court March 21 for a status hearing.

SECURITY-CLIPS-WITH-BLUR-TRACKING-022723.00_02_27_29.Still002.jpg

Video shows the suspect, identified as Edi Villalobos Jr., running from deputies after they unshackled him in the courtroom. He fled down a hallway and out an employees-only entrance and was arrested hours later. (Washington County Sheriff's Office)

The start of his trial was canceled after the escape, according to the sheriff's office.

Authorities said it would be rescheduled.

Get more from FOX News.

OregonCrime and Public Safety