SAN JOSE — In a move that’ll make immigration hardliners plotz, Gov. Jerry Brown has appointed an Iranian-American immigrant to serve in Santa Clara County Superior Court as a judge.

Iran is one of the countries included in President Trump’s travel ban. Brown’s pick, prosecutor Nahal Iravani-Sani, emigrated from Iran to the United States in 1979 when she was 10 years old.

And she wasn’t even a citizen — just a permanent resident with a green card — when she volunteered in the mid-1990s to work for the Santa Clara County District Attorney’s Office. Within three months, former District Attorney George Kennedy hired her. (She became a US citizen long ago.) She has been a prosecutor for 22 years.

“I truly feel humbled to be chosen and honored to serve the community,” Iravani-Sani said.

Now 48, she is married with a son in high school and another in his freshman year in college. She is a Democrat. Judges earn an annual salary of $200,042.

While prosecuting sex offenders for failing to register with police, she told the Huffington Post last year, she noticed that sex offenders who were mentally ill kept getting thrown in jail for failing to register. Working with judges and defense attorneys, she created a process to transfer supervision of such offenders to the Mental Health Court, where they are seen monthly and may register there.

“I am proudest of this local reform because I collaborated with my colleagues across the criminal justice system to implement a new policy and to address a longstanding issue that had existed for years, but no one had taken the initiative to address in the past,” she said.

Known for her friendly, collegial manner, she also has taught at the Stanford Law School’s Trial Advocacy Clinic since 2013 and was a lecturer at the Santa Clara University’s law school in trial techniques from 2006 to 2013. Iravani-Sani also is a member of the Iranian American Bar Association Board of Advisors and the Pars Equality Center Advisory Board. She went to law school at Santa Clara University after graduating from the University of California-Irvine.

By the way, of Brown’s 34 judicial appointments, more than half — 56 percent — are women.