The controversial Arizona immigration bill signed into law last week was written in part by a conservative immigration law expert and Republican activist who’s a former top aide to John Ashcroft, was recently hired by Sheriff Joe Arpaio, and is running for statewide office.

Kris Kobach, a law professor at the University of Missouri, Kansas City, was brought in by far-right Arizona legislator Russell Pearce to help draft the legislation that critics are calling “a social and racial sin.”Who is Kobach? Well, as John Ashcroft’s top immigration adviser at the Justice Department, he created a program, designed to tighten border security after 9/11, which included close observance of Arab and Muslim men, even legal U.S. residents. It was shelved after complaints of racial profiling and discrimination, according to the Southern Poverty Law Center.

That didn’t hold the Yale-Law-educated Kobach back for too long though. Seen as a rising star in the GOP, he was given a speaking slot at the 2004 Republican National Convention, where he called for the U.S. military to be sent to the Mexican border to enforce security. Articulate and good-looking, Kobach has since gone on to become a frequent media spokesman for the anti-illegal-immigration cause.

And as a lawyer for the Federation for American Immigration Reform (FAIR) — an anti-illegal immigration organization that the SPLC lists as a nativist hate group — he’s carved out a niche as the go-to legal expert for governments looking to craft draconian immigration laws. Kobach wrote local laws for towns including Hazelton, Penn. and Farmer’s Branch, Texas, designed to crack down on citizens who rented property to illegal immigrants. The Hazelton law was struck down as unconstitutional by a federal judge in 2007.

No surprise, then, that when hard-line anti-immigration sheriff Joe Arpaio — himself a big winner in Kobach’s bill — was looking for someone to train his deputies in how to enforce immigration laws, he turned to Kobach. And it looks like Kobach is being compensated generously for his work.

Oh, and he’s now running for Kansas Secretary of State — a post that would make him the state’s top election officer.

Kobach recently toldTime he’s confident his Arizona bill — unlike the Hazelton one — will withstand constitutional challenge. “There are some things that states can do and some that states can’t do, but this law threads the needle perfectly,” he said.