SAN FRANCISCO — A 12-year-old girl’s lie on the witness stand cost Luther Jones 18 years.

A judge in California’s Lake County ordered Jones released from prison earlier this year after the girl — now 30 — came forward and said her mother told her to falsely testify in 1998 that Jones molested her.

“It’s a horrible injustice,” Jones’ attorney, Angela Carter, said. “Not just for Luther. His kids, his grandkids, the entire family has been affected.”

Perjured testimony such as that of Jones’ accuser is rampant in courts across the country, yet rarely prosecuted, legal observers say. A registry of exonerations in the U.S. by the University of Michigan Law School found perjury or false accusations were factors in more than half of the nearly 1,900 wrongful convictions the registry has tracked since 1989.

“You have a lot of cases where witnesses on opposite sides tell incompatible stories,” said Samuel Gross, a University of Michigan law professor who edits the school’s registry of exonerations. “Somebody wins, somebody loses, but no one is prosecuted for perjury.”

The district attorney in Lake County, spurred by Jones’ case, wants to change that. Don Anderson appointed one of his 14 prosecutors to a new perjury investigations unit earlier this year that may be the first of its kind in any district attorney’s office in the country.

The unit is investigating the mother of the girl who accused Jones of molesting her for a possible perjury charge. It is also looking at a handful of civil disputes between family members — cases, attorneys say, that are rife with false claims as husbands and wives fight over children and alimony.

“We are so plagued with lying in the courtroom that it seems to have become just accepted,” Anderson said.

The perjury unit in August filed its first case, prosecuting a woman who lied and fabricated documents when she was accused of failing to submit probation reports, Lake County Deputy District Attorney Daniel Flesch said.

Flesch said the woman was facing a 30-day jail sentence after the judge found she violated her probation, but prosecutors didn’t want her to get away with lying. The perjury and other charges she now faces carry a minimum sentence of 18 months in prison.

Perjury can be difficult to prove. In California, prosecutors have to show people knew what they were saying was false, but went ahead and said it anyway.

“If the person was just deluded, that’s not intent,” said Geoffrey Hazard, a professor emeritus at the University of California Hastings College of the Law in San Francisco.

District attorneys may not have the resources to mount complicated perjury cases, Hazard said.

Richard Underwood, a law professor at the University of Kentucky, said there is also a sense among prosecutors and attorneys that cross-examining witnesses will bring out the truth and juries will be able to spot liars.

Prosecutors often turn to perjury charges when they are pursuing someone prominent or they couldn’t get the person on other charges, Underwood said.

Mark Fuhrman, the investigator in the O.J. Simpson case, pleaded no contest to perjury in 1996 for denying at Simpson’s trial that he had used a racial epithet in the previous decade. Federal prosecutors charged baseball slugger Barry Bonds in 2007 with lying to a grand jury about using performance-enhancing drugs.

A jury deadlocked on the perjury charges, and a federal appeals court threw out Bonds’ sole obstruction conviction.

In Jones’ case, the girl testified that he molested her on five occasions, according to prosecutors. A jury convicted Jones of lewd and lascivious acts on a child, and a judge sentenced him to 27 years in prison.

The girl told investigators in February that she lied about the abuse at the behest of her mother, who was in a custody dispute with Jones. Prosecutors moved to overturn the conviction, and a judge found Jones, 72, innocent.

Carter said Jones is suffering from kidney failure and has been in an out of a coma.

Other district attorneys applauded Anderson’s efforts, though they cited additional factors that might prevent prosecutors from filing perjury charges.

Michael Ramos, the district attorney in California’s San Bernardino County and president of the National District Attorneys Association, said victims in gang and domestic violence cases might lie because they are afraid for their lives. He questioned whether it would be appropriate to prosecute those people.

Steve Wagstaffe, district attorney in the San Francisco Bay Area county of San Mateo, said judges may sentence a defendant more harshly if they think the person has lied, so pursuing a separate perjury case might not be worthwhile.

“(District attorneys) will say if it’s really egregious, we’ll look at it,” he said.

Anderson said he knows the obstacles to prosecuting perjury, but he hopes his efforts send a message.

“There’s no way you’re going to completely eliminate perjury,” he said. “I’m not a dreamer. But we do hope to deter a lot of people from blatantly lying.”