DECATUR, Ala. — One evening last fall, an informant for the Morgan County sheriff entered the office of a small construction business near this old river town and, he said, secretly installed spyware on a company computer. He had no warrant.

The sheriff, Ana Franklin, wanted to know who was leaking information about her to a blogger known as the Morgan County Whistleblower.

The blogger had been zeroing in on the sheriff’s finances, specifically $150,000 that by law should have gone toward feeding inmates in the county jail. Instead it had been invested in a now-bankrupt used-car dealership run by a convicted bank swindler.

Now the sheriff has become ensnared, along with others, in a wide-ranging government investigation. The Federal Bureau of Investigation is looking at her stewardship of taxpayer money, as well as the dealership and its financial links to prominent people in town, including several state law enforcement agents, according to more than a half-dozen people who say they have spoken to the F.B.I. Government divers recently searched the bottom of a creek for evidence.

What, if anything, investigators have uncovered is not known. But The New York Times found that since taking office in 2011, Sheriff Franklin has failed to comply with court orders, has threatened critics with legal action and has not publicly accounted for tens of thousands of dollars raised through charity events.

Her activities point to questions about the broad powers afforded America’s county sheriffs, newly emboldened in the era of President Trump. Unlike appointed municipal police chiefs, sheriffs answer only to voters, giving them often-unfettered dominion not just over county law enforcement but over the jail and the lucrative service contracts that go with it.

Image

The former site of a used-car dealership in Morgan County. Sheriff Franklin used $150,000 in public funds to invest in the failed business.CreditJoe Buglewicz for The New York Times

“In certain jurisdictions there is a feeling by sheriffs that this is my fiefdom — I am in charge, my way or the highway,” said Sarah Geraghty, a lawyer at the Southern Center for Human Rights in Atlanta, which has filed lawsuits against a number of sheriffs. “Sometimes that kind of culture can lead to sort of a sheriffs-gone-wild kind of behavior.”

If these officers of the law are also politicians, their politics have increasingly adhered to the idea of the sheriff as an almost mythic figure — a pure expression of democracy, local protector of the people, accountable only to the people. In recent years, a group of activist sheriffs has coalesced around such hot-button conservative issues as gun rights, immigration and the use of federal lands in the West.

“Mostly we protect people from criminals, but sometimes we protect them from an overreaching government,” said Brad Rogers, the sheriff of Elkhart County, Ind. He added: “I’m answerable to the people. I have a face and a name. Try asking the federal government for a face and a name.”

The apotheosis of the idea that federal and state law is subordinate to local authority is Joe Arpaio, the former Arizona sheriff who earned notoriety for his aggressive pursuit of unauthorized Latino immigrants. After the 2012 school massacre in Newtown, Conn., hundreds of sheriffs allied with Mr. Arpaio signed a pledge not to enforce the Obama administration’s gun-control proposals.

Ultimately, Mr. Arpaio was convicted of contempt for defying a federal judge’s order to stop violating immigrants’ constitutional rights. But Mr. Trump pardoned him over the summer, seemingly endorsing his view of local authority. Indeed, the Trump administration has instructed sheriffs to disregard federal law and detain undocumented immigrant suspects longer than a number of federal judges have said is constitutionally allowed. And when the president announced this month that he was drastically shrinking two national monuments in Utah, he cast the decision in terms of protecting citizens from “federal overreach.”

Sheriff Franklin is ideologically aligned with many conservative causes, and during the 2016 presidential race had a featured role in a national advertising campaign where sheriffs called for tougher border security. “Lives are depending on it,” she said on camera.

In two interviews with The Times, the sheriff said she had done nothing illegal and had not violated anyone’s civil rights. “I have worked my tail off to try to do the right thing and make the best decisions that I can make,” she said.

She said she had tried to make her agency more accountable, and added, “Since I have taken office, I have attempted to train these deputies, to equip them, to manage them in the piddly little budget that I’ve been given.” As for the federal inquiry, the sheriff said, “The F.B.I. has not informed me of any such investigation.”

The sheriff makes no apologies for her belief that voters and the state constitution allow her to carry out her own vision of law enforcement. “I run it based on what the public wants or likes,” she said.

Officers and the Law

While some see that attitude as a defense of liberty, others worry that it is simply license for sheriffs to act as if they are above the law.

“There’s a glorified notion of local sovereignty that flies in the face of 200 years of constitutional progress in the United States,” said Michael Waldman, president of the Brennan Center for Justice, a nonprofit focusing on issues of democracy and equal rights. “Sheriffs have an important role, but the fact that they’re elected does not mean they’re not required to operate within the law and the Constitution.”

This year, the sheriff in Worth County, Ga., ordered his deputies to enter the local high school in search of drugs. They lined up 850 students with legs spread and hands against the hallway walls. Deputies inserted fingers into girls’ bras, and touched their underwear and genital areas while searching in their waistbands or reaching up their dresses, according to the Southern Center, which sued the sheriff.

Image

Ana Franklin, the state’s only female sheriff, did not follow a traditional path into law enforcement.CreditJoe Buglewicz for The New York Times

The deputies had no warrant or other authority to conduct the search, the suit charged. No drugs were found.

Soraya Kawucha, a former deputy sheriff who teaches criminal justice at Sam Houston State University in Huntsville, Tex., called sheriffs the rarely studied “bastard son” of law enforcement. “Researchers either ignored sheriffs or made erroneous conclusions that we were no different than police departments,” Ms. Kawucha said.

Because sheriffs have no direct supervision, criminal prosecution or lawsuits may be the only checks against those who abuse their power. The Georgia sheriff was recently indicted in connection with the mass search and has pleaded not guilty. The lawsuit resulted in a $3 million settlement.

In Florida, a federal appeals court ruled in 2014 that detectives from the St. Johns County sheriff’s office had violated the constitutional rights of a defendant during what his lawyer had assumed was a privileged and private meeting in a closed interview room at the sheriff’s office. Unbeknown to the lawyer, Anne Marie Gennusa, detectives were secretly monitoring the conversation. When the client handed Ms. Gennusa a written statement, detectives rushed in, “forcibly grabbed” it and arrested him, attaching the statement to his arrest report, court records show.

County governments have budgetary control over sheriffs, but little else. They can threaten to withhold money, but they open themselves up to criticism that they are endangering law and order.

In Arizona, voters kept re-electing Mr. Arpaio despite his long record of misconduct complaints. And in Putnam County, N.Y., Sheriff Donald B. Smith repeatedly and falsely accused the local district attorney, Adam Levy, of shielding an undocumented immigrant during a rape investigation. Like Sheriff Franklin, Sheriff Smith appeared in the video campaign for stronger border controls.

It took a defamation lawsuit for Sheriff Smith to finally admit this year that he had lied; the suit was settled with $125,000 in public funds. “Technically, he answers to voters, but I would say he really answered to no one,” said Michael Sussman, a lawyer for Mr. Levy. In November, voters finally had enough and tossed him from office.

Sheriffs can submit to voluntary state or national accreditation surveys, but their agencies rarely have their credentials taken from them for rule violations.

Some sheriffs have been in office so long that evicting them is almost unthinkable, regardless of their records.

In his book “Just Mercy,” the public-interest lawyer Bryan Stevenson tells the story of his client Walter McMillian, a black man with no prior felony convictions who was stopped by Sheriff Tom Tate and other officers in Monroe County, Ala., in 1987 and sent to death row for the shooting of an 18-year-old white female store clerk.

It later emerged that the officers had pressured a key witness into lying about Mr. McMillian. Lending haunting resonance to the case was its venue: Monroeville, home of Harper Lee, whose novel “To Kill a Mockingbird” told a strikingly similar story. Mr. McMillian was eventually freed.

How do voters feel about Sheriff Tate? He has been elected seven times and is in his third decade in office.

A Tax Loophole

Ana Franklin, the state’s only female sheriff, did not follow a traditional path into law enforcement. Raised in this working-class city a short distance across the Tennessee River from Huntsville and the Army’s Redstone Arsenal, she ran a bridal shop, posed as a nightclub “calendar girl” in miniskirt and fishnets, trained German shepherds and ran a fitness center.

She was elected in 2010, defeating an unpopular incumbent. But she had another advantage, at least according to Glenda Lockhart, otherwise known as the Morgan County Whistleblower: She comes across as “just the most sweet, innocent, hard-working person you could ever imagine,” Ms. Lockhart said.

Image

Sheriff Franklin has given differing accounts about who processed the cash generated by her county rodeo.

Now in her second term with plans to run for a third, Sheriff Franklin, 53, broke into police work in neighboring Limestone County, under the tutelage of its longtime sheriff, Mike Blakely.

It was there that she learned the importance of annual rodeos for fund-raising and publicity. No one in the state did it bigger or better than Sheriff Blakely. With a skybox selling for $650, the events have raised close to a million dollars for law enforcement and for reinvestment in rodeo operations, he estimated. Voters must take him at his word, because rodeo money is not among the nine revenue streams audited by the state, records show.

The Morgan County rodeo had been a smaller affair until Sheriff Franklin took office. She installed an A.T.M. just outside the gate, allowing people to pay cash not only for admission but for concessions. And she asked employees and volunteers to sell advertisements to local businesses. Before long, the ad book more than tripled in size.

Rick Sherman, a former deputy, said he sold ads while on duty. “I’m an armed law enforcement officer asking for money, and that’s never a good thing,” said Mr. Sherman, who left his job nearly two years ago after a falling-out with Sheriff Franklin. He said he had also been asked to work without pay at the rodeo. The sheriff said she did not force anyone to sell ads or work without pay.

Sheriff Franklin said the rodeo brought in about $20,000 a year in profit, but she has never publicly accounted for all the money, except to say that it went to local charities and law enforcement. She promised to produce financial records for her rodeo, but a month later gave only names of charities and no amounts. The rodeo’s financial records, she said, were “reviewed by a C.P.A. firm.”

In interviews, the sheriff gave differing accounts about who processed the rodeo cash. First she said the money went through a tax-exempt organization set up a couple of years ago called Morgan County Sheriff’s Rodeo. Before that, the money was kept in a regular account, she said.

After The Times could find no group by that name registered with the Internal Revenue Service, Sheriff Franklin corrected herself, saying rodeo proceeds had actually gone to a different nonprofit: Morgan County Sheriff’s Mounted Posse, founded in 1963.

Normally, tax-exempt organizations must file annual financial reports for public inspection. But Sheriff Franklin’s is exempt from public disclosure because of an I.R.S. loophole for charities affiliated with government agencies. “The I.R.S. assumes organizations controlled by governmental entities will be good tax citizens,” said Marc Owens, former director of the I.R.S. division of exempt organizations.

The Times identified 19 such organizations — not all of them related to rodeos — affiliated with Alabama sheriffs. The sheriff in Etowah County has three.

Image

Rick Sherman, a former deputy, said he was asked to sell ads for Sheriff Franklin’s rodeo while he was on duty.CreditJoe Buglewicz for The New York Times

Asked to explain how their rodeo profits were managed, three sheriffs gave names of nonprofit groups that they said held the money, but a search of government records could find no such entities. One sheriff said his rodeo was a tax-exempt nonprofit, even though it is incorporated as a for-profit business.

The fact that sheriffs’ offices are handling large, unaudited sums of money has drawn the attention of government investigators.

That said, the value of rodeos for sheriffs in need of votes and money is considerable. Sheriff Blakely, Alabama’s rodeo king, is now in his third decade in office. Recently, the first three news items on his web page were rodeo promotions.

The fourth item — a major drug arrest.

A Suspicious Investment

The mere mention of Ms. Lockhart is enough to shear off Sheriff Franklin’s folksy veneer. A liar, a fabricator, a crazy woman: That is how she describes Ms. Lockhart. “I have never in my life heard of anything like this or been through anything like this,” the sheriff said.

Ms. Lockhart stands by her postings. The diminutive grandmother became a whistle-blower after retiring as a security manager at the Redstone Arsenal, using her military research skills to shadow the sheriff and her allies.

Ms. Lockhart first took an interest in the sheriff after deputies came to her rural home in July 2011 to investigate a supposed disturbance. What happened next is in dispute, but she and her husband, Harold Lockhart, say the officers found nothing but refused to leave when asked.

Deputies arrested the couple after Mr. Lockhart, a retired military police officer, said he had had enough and was calling his lawyer. The Lockharts successfully sued the sheriff for false arrest. And while the sheriff was not present for the arrest and later said she knew nothing about it, Ms. Lockhart did not forget.

Image

Glenda Lockhart, a blogger known as the Morgan County Whistleblower. Her company computers were seized in a raid while she was investigating the sheriff’s activities.CreditJoe Buglewicz for The New York Times

“I decided then I was not going to sit back and take it,” she said. “Some people can’t afford to fight it, so I started watching.”

With a profitable construction business, Ms. Lockhart had the resources to pursue complaints big and small. “I waited until employees were fired — then I would tell them I was the Morgan County Whistleblower,” she said.

This year she even went so far as to hire a pilot to fly her over southern Alabama, where she videotaped a stretch of land that she believed the sheriff had secretly obtained for her horses. That suspicion, Sheriff Franklin says, is not backed by a scintilla of evidence.

There was, however, more than enough evidence to link the sheriff to Priceville Partners L.L.C., a get-rich-quick scheme that spread a toxic cloud over the business community.

A used-car dealership offering title loans, Priceville Partners had begun opening branches around the county, and investors were welcome. Ordinarily, law officers might investigate rather than invest in a business co-owned by the likes of Greg Steenson, who had done prison time for a multimillion-dollar check-kiting scheme. But several officers from the Alabama Law Enforcement Agency, along with Morgan County deputies, became financially involved, records show. One agent texted another asking if he wanted a one-month $7,000 profit on a $10,000 investment. Sheriff Franklin’s father worked there; her daughter did the bookkeeping.

The sheriff invested $150,000. She would later say that she had not known Mr. Steenson was a co-owner, even though her daughter said that was clear from her first day on the job.

Ms. Lockhart had begun blogging about the dealership in 2015, after noticing the proximity of the lawbreaker and the law enforcers. She was not the only one watching. So was the F.B.I. in Huntsville, which soon became a popular destination for those with stories to tell about the sheriff or the dealership. In local lingo, they “went across the river.”

In January, after Ms. Lockhart published a copy of Sheriff Franklin’s $150,000 cashier’s check — signed over to Priceville Partners — the sheriff’s lawyer, Barnes F. Lovelace Jr., accused the blogger of obtaining it illegally. “A criminal investigation has been initiated,” he wrote to Ms. Lockhart. No charges have been filed.

Image

The cashier’s check that Sheriff Franklin used to invest in the car dealership, which was run by a convicted bank swindler.

The sheriff had once even threatened legal action against the creators of a Facebook page seeking “Justice for Aubie,” a golden retriever shot to death by deputies during a drug raid. She said that the dog had lunged at the officers, and that the page was intended to “inflame the public.” A petition with 1,600 signatures was sent to the Alabama Sheriffs Association, asking that officers be taught how to handle pets with nonlethal force. Amid fears of a lawsuit, the Facebook page came down.

Sheriff Franklin’s mystery check was not so easily dismissed. According to The Decatur Daily, she said that the money had come from her savings and retirement accounts. Her lawyer later said it was invested in a “legitimate business,” a strange description for an enterprise whose co-owner, the felon Mr. Steenson, had recently been arrested on new charges — of theft and forgery involving the dealership. The district attorney said Mr. Steenson sold vehicles for which he had no title and then forged people’s names. (Priceville Partners filed for bankruptcy last year.)

Sheriff Franklin eventually admitted the money had been withdrawn from an account earmarked for feeding inmates. For some Alabama sheriffs, that wouldn’t have posed a problem. But Morgan County was different.

Hungry for Money

Ana Franklin had her eyes on inmate food money even before she took office.

In preparing for her new job, she asked the county attorney if surplus food money would be hers to keep. His answer, according to press reports at the time, was no.

That sheriffs would be able to profit from inmate food money comes down to an unusual provision of Alabama law: In most counties — Morgan included — food money is deposited not into government accounts, but into sheriffs’ personal accounts. Nearly a decade ago, when inmates’ lawyers demanded to know how much of this money Alabama sheriffs were keeping for personal use, the state sheriffs’ association instructed them not to answer.

But while other sheriffs have legally kept the surplus money, Sheriff Franklin was bound by a federal consent decree that all her inmate food money be used for just that — food.

Image

Sheriff Franklin in the kitchen at the county jail. She violated a court order by investing in the dealership with money earmarked for inmates’ food.CreditJoe Buglewicz for The New York Times

That court order stems from a legal action that the Southern Center brought against Sheriff Franklin’s predecessor, Greg Bartlett, who had been underfeeding inmates while taking $212,000 in food money for his personal use. In a signature moment as sheriff, Mr. Bartlett paid half-price for a truckload of unsold corn dogs and for three months fed them to inmates for breakfast, lunch and dinner, earning himself the sobriquet “Sheriff Corn Dog.”

After the source of the $150,000 came to light, Sheriff Franklin said that because of bad legal advice, she had not realized she was violating the court order. Besides, she said, she had returned the money, and her prisoners received nutritious meals.

Ms. Geraghty, the Southern Center lawyer, disagreed. She sent the sheriff a letter this year reporting inmate complaints of “reduced or watered-down portions,” and food that was frozen, had mold or contained rocks or, in one case, a nail. “During a recent meal at which chicken was served,” Ms. Geraghty wrote, “many inmates reportedly received cooking liquid from the pan in place of meat because the kitchen ran out of chicken.”

Those complaints, the sheriff’s lawyer said, amounted to a tiny fraction of all meals served — a record any restaurant would be pleased with. Ms. Geraghty did not press her case, citing the “exceedingly low constitutional bar” required to satisfy the consent decree’s mandate for improved food. The food order was ultimately lifted, but not before a federal judge found Sheriff Franklin in contempt of court and fined her $1,000.

The sheriff’s office also did not comply with a judge’s order that an inmate not be allowed to work outside the jail because he posed a danger to the community. Sheriff Franklin said she had since changed jail policy to prevent that from happening again.

Sheriffs have found other ways to squeeze money out of inmates. Some take a percentage of service contracts, including commissary sales and telephone charges. In Morgan County, a company that just won the jail phone contract pays the county a 90 percent commission on all its revenue from prisoners’ calls. In St. Johns County, Fla., the sheriff brings in tens of thousands of dollars a year by charging inmates “processing fees.”

In Morgan County, the sheriff oversees 19 different income streams and collects 25 percent of inmate wages. None of this money is supposed to personally benefit the sheriff.

Sheriff Franklin said she stayed within her budget, economizing, for example, by hanging inmate clothes on the line to dry. “It saved me $63,000,” she said.

A Spy Mission

In October last year, armed with a warrant, the sheriff’s drug task force seized Ms. Lockhart’s computers and electronic devices, court records show. In preparing for the raid, the sheriff hired an unusual spy — Ms. Lockhart’s 19-year-old grandson, Daniel Lockhart, who aspired to work in law enforcement.

Mr. Lockhart said the sheriff’s technology expert had instructed him on how to plant spyware. The raid took place about a week after he said he installed the software.

Mr. Lockhart had been living with his grandparents and working in their business. He gained access to the office after hours, he said, by telling Ms. Lockhart that his girlfriend needed an office computer for homework. Ms. Lockhart said she later discovered the spyware on her home computer as well and took it to the F.B.I., which has retained it.

Image

Government divers recently searched a creek for evidence in a wide-ranging investigation involving the dealership.CreditJoe Buglewicz for The New York Times

The sheriff denied that the seizure was retaliatory, telling the news media, “Not until her personal agenda, her hatefulness and her vengeance to try and tear this office down, to take this office and myself down, and prepare for another election, did she cross the line of criminal activity.”

But over a year later, Ms. Lockhart has yet to be charged, and says she broke no laws. The investigation continues, the sheriff said, though she was unsure who was directing it. “It’s not my investigation,” she said.

Sheriff Franklin admits to hiring the grandson, but denies that she or anyone in her office asked him to install spyware. “We have absolute proof, ” Mr. Lovelace, the sheriff’s lawyer, wrote to The Times. He produced an analysis of Ms. Lockhart’s business computers by a firm he hired that, he said, found no spyware. Several parts of that report were omitted, he said, because of a continuing criminal investigation that he was not at liberty to describe.

The sheriff’s denial is undercut by four people who told The Times separately that they had knowledge that the sheriff’s office taught Mr. Lockhart how to install the spyware. Among them was Ricky Brewer, the sheriff’s former technology officer, who said he told the F.B.I. that his replacement acknowledged giving the grandson the software.

Mr. Lockhart said in a sworn statement that he had been paid several hundred dollars and participated only because he had been told that the investigation focused on the county jail warden, not his grandmother, and that she would not get in trouble.

Two months before the raid, a similar operation against another critical blogger had occurred in Terrebonne Parish, La. The sheriff there, Jerry Larpenter, accused the blogger of “criminal defamation.”

A federal judge, Lance Africk, found the raid unconstitutional, explaining the danger this way: “If you speak ill of the sheriff of your parish, then the sheriff will direct his law enforcement resources toward forcibly entering your home and taking your belongings under the guise of a criminal investigation.”

Here in Morgan County, Ms. Lockhart has filed a federal lawsuit accusing Sheriff Franklin of violating her right to free speech, invading her privacy and slandering her, charges the sheriff denies. Ms. Lockhart’s computers, containing vital company records, were returned only after a court hearing.

All the while, the Morgan County Whistleblower continues to fire away. “There is no way of stating how terrified Sheriff Ana Franklin is right now,” Ms. Lockhart wrote last month. And she added, “She is scared to death that some of her loyalists will cross the river and roll.”