When Jeremy Barnes and his family decided to move from Washington to a small Idaho town that borders Utah, the former police officer thought it was his chance to change careers.

He wanted to be his own boss. Start a business.

Barnes wants to be a private investigator, but there aren’t many potential clients near his new home in Franklin, a rural area that’s home to fewer than 1,000 people.

He could get some business from Preston, but he hoped most of his clientele would live in Utah — since the state line is less than a mile away and Logan is not a far drive.

Barnes said it’s typical for people in Franklin to commute into Utah for jobs. His wife, a registered nurse, works in Logan.

“If you’re not a farmer,” he said, “you’re working over there.”

But a unique requirement in Utah’s laws has made it impossible for Barnes to start his work: Private investigators must live in Utah to be licensed here.

It was surprising to Barnes, who can already do business in Idaho because the state does not require its private investigators to be licensed.

“I didn’t think it would be an issue at all,” he said, “based on my education and work experience, I assumed I would qualify for the license in Utah.”

Barnes is now suing Utah officials, saying it is unconstitutional and “economic discrimination” to bar out-of-state residents from working as private investigators.

His lawsuit is backed by the Institute of Justice, a nonprofit libertarian law firm that focuses on litigating cases where they believe the government has overreached. It’s the same law firm that sued Utah in 2011 — and won — over the state’s requirement that people needed a cosmetology license to braid hair.

Richard Hoover, a lawyer and constitutional law fellow with the nonprofit, said Tuesday that Barnes meets the criteria for a Utah private investigator license in every other way. He’s been in law enforcement for a dozen years, has never been in trouble with the law and has a bachelor’s degree in criminal justice.

“He meets all the requirements,” Hoover said, “but for the bureaucratic red tape that he does not live in Utah.”

Hoover said Utah is the only state that requires its private investigators to be in-state residents, and there are some states, like Idaho, that don’t require licenses at all.

Barnes’ attorneys say in the lawsuit, filed last week in federal court, that Utah changed its laws in 2011 at the behest of the Private Investigator Association of Utah. Rep. Keith Grover, who sponsored the legislation, told lawmakers in 2011 that the residency requirement was done to keep “unqualified out-of-state competitors from taking Utah jobs,” according to the lawsuit.

The Utah Department of Public Safety, which licenses private investigators and is being sued, did not respond to a request for comment Tuesday. The association of Utah private investigators also did not return a message seeking comment.

Barnes’ attorneys wrote in the lawsuit that Utah’s residency requirement violates the Equal Protection Clause. They noted that only one other licensed profession — a court reporter — has a residency requirement in Utah.

Hoover said the institute will ask a federal judge for a preliminary injunction allowing Barnes to work in Utah as they litigate, but he said the ultimate goal is to force a change in the state law.

“The fact that the government is making it harder for people to work seems backwards,” he said. “That’s why we’re fighting back.”

Barnes said that by the time he realized Utah had a residency requirement, he had already moved to Idaho. He had called the Utah office to ask a question about the application, and said he was told to not even bother applying.

To him, that doesn’t seem right.

“It’s huge,” he said. “I live in such a small town over here. That was the basis of me even thinking of doing this, because of Logan and I live minutes from the border.”