Orange County sheriff's deputies this week arrested two people for allegedly driving on suspended licenses after leaving the Harbor Justice Center in Newport Beach.

The drivers had been charged with, but not convicted of, driving under the influence before their court appearances but got in their cars anyway, police said.

As part of an undercover sting Monday, deputies waited in courtrooms where DUI defendants were scheduled to appear.

Each of the defendants had been told by a judge not to drive or had been warned previously that their licenses were suspended, according to the Sheriff's Department.

After each court appearance, deputies followed the defendants to the parking lot to check their compliance.

"While some offenders complied with the law and had alternate means of transportation, two individuals proceeded to get behind the wheel and drive away from the courthouse," the Sheriff's Department said in a news release.

Deputies stopped the two drivers, arrested them on misdemeanor charges of driving on a suspended license and impounded their cars for 30 days.

Both drivers were cited and released at the scene.

The Sheriff's Department said it uses courthouse stings and DUI checkpoints as deterrents.

— Jeremiah Dobruck

Twitter: @jeremiahdobruck