It is illegal to massage a horse in Utah without a costly and time-consuming massage therapist’s license, but until then-Rep. Frank Pignanelli finally got a bestiality bill passed — after earlier failures and much wrangling — you could have sex with it.

That’s just one of the goofy occupational licensing requirements in Utah, which has the 13th most onerous restrictions for practicing a trade in the nation, according to the Institute for Justice.

Pignanelli successfully made it illegal to have sex with animals in the mid-1990s. The House voted down his first try after a debate in which one legislator said Pignanelli “just doesn’t understand the pressures on the farm in rural Utah.”

Massaging a horse, even if you are working under a veterinarian, is still illegal without a massage therapist’s license.

When attempts were made to ease that restriction this year, the Legislature instead boosted the burden by requiring someone with a massage therapy license to take additional training to work on animals.

The massage therapists’ lobby also went to the Legislature to block barbers from performing their traditional shoulder massages given to clients after a haircut. They argued that such a procedure could hurt customers unless the barber had gone through the required hours of training and paid for the costly classes.

Common sense prevailed, and lawmakers allowed the barbers to perform the massage, although they debated how long the procedure should last and ultimately codified that it be “brief.”

When the issue was argued before the Senate Business and Labor Committee last year, Sen. Curt Bramble, the panel’s chairman, had a little fun illustrating the silliness of the restriction.

As representatives for the massage therapists were testifying, Bramble’s wife, Susan, stood behind the Provo Republican and massaged his shoulders.

Then there was the hair-braiding flap.

The cosmetology industry had pushed through legislation a number of years ago that made it illegal for someone to braid a neighbor’s or a friend’s hair for money without a cosmetology license, which at the time required 2,000 hours of costly training.

The Institute for Justice sued the state over its braiding restrictions, but the legal action was shelved after the Utah Division of Occupational and Professional Licensing promised to work with the Legislature to change the law.

However, when the bill came up, cosmetology students were bused to the Capitol to oppose it, and it fizzled.

The institute resumed its lawsuit and won. The Legislature finally rescinded the law, but not before the state paid more than $100,000 in legal fees.

DOPL often gets blamed for ridiculous licensing rules, but its hands are tied since lawmakers set those provisions. The agency is working with several legislators to make the rules more reasonable.

For example, it requires more hours of training to become a cosmetologist to do hairstyles, nails and pedicures, than it does to become a lifesaving EMT.

Rep. Jim Dunnigan, R-Taylorsville, previously helped reduce the cosmetology requirements from 2,000 hours to 1,600 (1,100 hours for those cosmetologists who only do hair). But that remains much more than the 120 hours it takes to become an EMT.

Dunnigan also sponsored legislation that allows licensed cosmetologists moving to Utah from other states to be licensed here without going through additional training.

Other troubling DOPL requirements were imposed in the construction industry before Rep. Mike Schultz, R-Hooper, addressed that issue with legislation last year.

Such jobs as house painting, masonry and other construction-related tasks also required more hours of training than EMTs.

Schultz told me the licensing hurdles in construction made it difficult for contractors to find qualified laborers to perform the subcontracting work.

Rep. Norm Thurston, R-Provo, sponsored a bill last year to ease restrictions on immigrants coming into the state with years of experience in their fields but who are unable to work in those jobs because their previous education doesn’t match the requirements for their trade in the Beehive State.

“A barber in Peru, with 20 years of experience, can’t be a barber in Utah,” he said, “until going through the months of training specified in Utah law.”

His bill failed.

And this is a worker-friendly state?