Seven motorists were arrested Wednesday in an undercover sting at the Sonoma County Hall of Justice after they drove away from court appearances with suspended or invalid licenses, police said.

Plainclothes officers followed the defendants as they left the courthouse following appearances for DUI offenses and license violations, Petaluma Police Sgt. Ken Savano said.

The drivers, six men and a woman, ranged in age from 23 to 58.