Immigration agents were in the hallway outside, waiting to arrest the undocumented immigrant afterward and possibly deport him.

He never came out.

What happened in that courtroom is now the subject of an investigation. The focus is on the presiding judge, and whether she allowed Salazar to sneak out through another door.

"We are trying to determine what exactly happened and whether any rules or policies were in fact violated," said Multnomah County Circuit Court ‎Trial Court Administrator Barbara Marcille.

It was January 27 when Salazar, a 22-year-old Mexican national, went before Judge Monica Herranz to plead guilty to a DUI.

Plainclothes Immigration and Customs Enforcement agents stationed themselves outside because someone convicted of a DUI is considered a risk to public safety, said Billy Williams, US attorney for Oregon. According to ICE, Salazar had been deported previously and had returned to the country.

"Whenever ICE approaches someone they know has a criminal history and have done research to know they are not lawfully in the country, they take them into custody, that's their job," Williams said.

Salazar entered the courtroom with his lawyer but never came out, Williams said.

"And so a period of time passed by, the attorney representing the individual came out and they asked him where the individual was and he said 'I don't know, he was in the courtroom when I left,'" Williams said. The ICE agents waited a bit longer, then tried to get into the courtroom, but the door was locked, he said.

Every courtroom in the building has three doors: one public entrance from the hallway, one private entrance the judge uses, and a third door through which in-custody inmates are ushered from the jail.

"So what happened with the individual in question was that he was allowed to use one of those (other) two doors to elude being taken into custody," Williams said, referring to the judge's entrance and the jail inmate entrance.

Marcille, the court administrator, said that while there are no official rules about who should use which door when entering and exiting courtrooms, there are common practices.

Herranz is a pro temp judge appointed by the Supreme Court as a staff position, as opposed to an elected official, said Marcille, who added that she and Multnomah County Circuit Presiding Judge Nan Waller are spearheading an internal investigation.

The incident is not under criminal investigation, Williams said.

Herranz declined to comment when contacted by CNN.

The episode has sparked discussions about the pros and cons of having ICE agents at the courthouse.

"The uncertainty of immigration policy at the federal level is planting fear and concern in communities throughout Oregon," Gov. Kate Brown said in a statement to CNN. "Trust in public institutions is undermined when Oregonians seek assistance from public officials, but are instead met with suspicion from those they expect to help them.

"This kind of fear also puts the growth of Oregon's economy at risk; our state relies on immigration policies that allow Oregon to compete in the global market."

Williams said he understands that having ICE agents at the courthouse can make some people fearful of going to the courthouse for their business.

"But on the other hand, there's an awareness among the officials in Multnomah County that they don't have the lawful authority to prohibit ICE from entering a county courthouse," he said.

"They're there lawfully, and ICE has worked very hard over the years in Oregon to be sensitive to the concerns of the judges in state or county courthouses and try and take people into custody outside the courthouse facilities."

Salazar was taken into custody by ICE agents on February 10 when he returned to the courthouse for another hearing. His attorney told CNN that he has not been able to speak with him. Salazar was reportedly being held at an ICE detention facility some 150 miles away in Tacoma, Washington.