It looks like a Madrean alligator lizard, Elgaria kingii; they range down into Mexico. I have a pair from Arizona. Funkyres is right, you can't go by tail length and have to look at head shape in adults with males having broader and more triangular heads. Sometimes alligator lizards will evert their hemipenes when they are struggling after being picked up. Sometimes you'll get lucky and be able to sex juvenile males this way.

-Alice