In 2012, three months after Eddie Scott became sheriff of Clay County, Miss., a claim by a woman he had helped put behind bars threatened to tarnish his earliest days in office.

The woman said in an April court filing that, while chief deputy less than three years earlier, he had coerced her into a sexual relationship after she was arrested. Promising to use his influence in their rural community to keep her out of prison, she said, the lawman drove her to a hog farm to have sex in his patrol car on at least five occasions.

She laid out her allegations in state circuit court in October 2012 and asked a judge to overturn her prison sentence. To back up her story, the 26-year-old showed suggestive letters with a return address of the Clay County Sheriff’s Office and signed by then-Chief Deputy Scott, who was 47.

“Hey Sexy,” he wrote to her in prison nine months before his election to the top job. “Got my blood pumping hard after reading the last two letters. Can’t stop thinking of how tight it is. I want all of that and more if you can.”

The revelations could have led to an internal investigation, a criminal inquiry or a public reckoning for the newly installed sheriff. Instead, powerful officials in Clay County took no action.

Judge Jim Kitchens ruled against the woman. Sheriff Scott’s predecessor, Laddie Huffman, had known of the allegations before retiring but did not report them to state or federal law enforcement agencies. There is no record of any internal investigation or disciplinary review.

The court file for the woman’s case — the only public record of the allegations — went missing at the Clay County Courthouse, likely for years. It was placed in the wrong filing cabinet, lost among hundreds of cases, until reporters pressed for it this summer while investigating other allegations against Sheriff Scott.

In interviews, Sheriff Scott would not directly answer whether he had ever had sex with the woman. When asked about his relationship with her, he called it a “mistake.” He denied coercing her.

“What she didn’t tell was, she was coming up to the office with her tits hanging out,” he said. “I never put myself in that position anymore.”

But an investigation by The New York Times and the Mississippi Center for Investigative Reporting at Mississippi Today, which included dozens of interviews and a review of court records and exclusively obtained internal documents, found that during his 11 years in office, Sheriff Scott has repeatedly been accused of using the power of his position to harass women, coerce them into sex and retaliate against those who criticize him or allege abuse.

In rural communities like Clay County — dominated by farmland and economic hardship — some sheriffs rule like kings. They can arrest anyone they choose, smear reputations and hand out reprieves and other favors. They have enormous latitude to hold people in jail as long as they please and they answer to no one, typically facing little press or prosecutorial scrutiny.

Three months ago, The Times and Mississippi Today told the story of another sheriff’s office, less than 40 miles away. Former Noxubee County Sheriff Terry Grassaree rose in the ranks of his Mississippi department and kept his elected office for years despite similar accusations of abuse. He was voted out in 2019 and now faces federal charges of bribery.

But in Clay County, Sheriff Scott remains in power even after repeated allegations of misconduct.

A local woman said the sheriff had repeatedly forced her into sex during her eight months in jail starting in 2017. When she began telling people after her release, she said, a sheriff’s deputy arranged to have drugs planted in her car — an allegation corroborated by a secretly recorded conversation with a man who said he had planted them.

In a court filing last year, a man claimed that Sheriff Scott had pursued a sexual relationship with his girlfriend and helped her avoid a lengthy prison sentence when the couple’s child died in 2019 with meth in his system. Prosecutors charged the parents with child neglect. While prosecutors sought only probation in the mother’s case, they offered the father a plea deal that called for 10 years in prison.

Also last year, a woman who once worked for the sheriff sued him, claiming he had subjected her to months of sexual harassment, including texts commenting on her breasts. After she filed her complaint, Sheriff Scott fired her boyfriend, a captain in the office.

At least five people who accused the sheriff of misconduct, or who were potential witnesses in the cases, said he had retaliated against them, efforts they believe were intended to silence them or discredit their allegations.

In 2021, the F.B.I. began investigating allegations against the sheriff. They interviewed nearly a dozen witnesses, including Sheriff Scott and staff members in his office. No charges have been filed.

Officials familiar with the allegations and how they have been investigated, including federal prosecutors, declined to comment. Sheriff Huffman, citing poor health, said he did not remember any of the allegations. Judge Kitchens did not respond to a request for comment.

In multiple interviews, including one on camera with reporters, Sheriff Scott, now 58, has denied harassing women, coercing them into sex or retaliating against anyone. He said he has had to defend his reputation from “con artists” and “drug users” who were inventing accusations to avoid jail time or somehow benefit financially.

The sheriff said he was the victim in all of this, and that he had been under attack. “It was a coordinated hit on me,” he said.

Sheriff Scott and his siblings grew up milking cows on their family farm in Montpelier, Miss., a rural crossroads along Highway 46 marked by a single gas station and the Baptist church his family attended.

After high school, he married, had children and worked at Bryan Foods, a meat processing company and one of the area’s biggest employers. Then he was called to serve on a Clay County grand jury and became fascinated with police work, he said.

In 1999, he became a full-time deputy for the Clay County Sheriff’s Office. He fought the drug trade just as meth was emerging as the scourge of rural America and he eventually became an investigator, responsible for solving the county’s occasional murders. He rose to chief deputy, second in command to Sheriff Huffman.

The logical heir when Sheriff Huffman retired, he won his first election in 2011 and took office the next year.

Today, Sheriff Scott is one of Clay County’s most popular figures and the face of area law enforcement. His brother, Terry, is listed as senior investigator on the Clay County Sheriff’s Office website; his son James serves on the Mississippi Highway Patrol’s SWAT team; and his sister, Tanya, has worked as the nurse for the county jail.

On the 137-acre spread where his family once raised cows, Sheriff Scott hosts fish fries and crawfish boils, where he swaps stories and swigs cold beer with fellow law enforcement officers and some of the county’s most powerful officials.

Sheriff Scott has covered his office walls with images of John Wayne, whom the sheriff considers his hero. The actor and the characters he played symbolize everything good and decent in America, Sheriff Scott said. “They don’t build them like him anymore.”

In his office, he keeps a Christmas card from former President Donald J. Trump, whom he has met several times. Beside it is a Bible that, he said, reminds him of his childhood.

“Back when we were kids, we all went to church and learned the difference between right and wrong,” he said. “And we’re not seeing that now.”

Sheriff Scott’s public persona clashes with what a woman named Amber Jones says she experienced after she failed three drug tests and was arrested for violating probation in May 2017.

That summer, Ms. Jones, then 21, was called down from her cell at the Clay County Detention Center to the sheriff’s office, where Sheriff Scott asked if she would like to help out filing paperwork.

She had spent weeks in a dirty jail cell without seeing the sun, she recalled. She told him yes and became a trusty, an inmate with special privileges, working for the jail records administrator, Patty Stange.

One day in the office, Ms. Jones recalled, Sheriff Scott held out a hand to her and said, “If you take this splinter out of my finger, I’ll give you an eight-hour home pass.”

Desperate to see her family, she agreed, and a few days later, the sheriff himself checked her out of jail to take her home, she said. A mile down the road, the sheriff stopped the car by a small brick house and told her she had to change out of her jail clothes.

Ms. Jones said she felt uneasy as the sheriff led her inside, through a bedroom to a bathroom. He gave her a T-shirt and left her alone to change.

But he eventually returned and came up behind her, Ms. Jones recalled, touching her and commenting on her tattoos. Without another word, the sheriff pulled her to the bed and forced her to have sex, she said.

Ms. Jones said she felt that she had no choice — he was the sheriff. “I felt like I was worthless, like I didn’t have any control over my own body,” she said. “There was nothing I could do to stop it.”

After she visited her brother and returned to jail, she said, the sheriff called her to his office and told her she didn’t have to worry about getting pregnant because he had been “fixed.”

For the rest of Ms. Jones’s eight months in jail, this pattern continued, she said: Sheriff Scott offered her home passes to arrange sexual encounters.

Her accusations were detailed in a federal lawsuit filed last year by a former employee of the Clay County Sheriff’s Office, Caitlyn Wilson. The suit claims that Sheriff Scott sexually harassed Ms. Wilson, and it cites Ms. Jones’s allegations as evidence of the sheriff’s mistreatment of women. In sworn testimony last month, Sheriff Scott declined to say whether he had ever had sex with Ms. Jones, citing his Fifth Amendment right to avoid self-incrimination. The case is set for trial next year.

In interviews for this article, Sheriff Scott denied taking Ms. Jones out of jail or having sexual contact with her. “Amber is a sweet, likable girl on the face,” he said. “But we learned that she’s one of the biggest con artists that ever walked the face of the earth.”

Had he had taken her out of the jail, he said, their exit would have been recorded on surveillance video and sign-out sheets. When reporters asked to review such materials, Sheriff Scott said the computer system that logged inmates’ whereabouts was broken.

Sign-out sheets were kept among thousands of pages of jail records stacked in lopsided piles on an office floor. A review of the only records available revealed that Ms. Jones had received at least one home pass.

Ms. Jones’s description of the house where she said the sheriff took her for sex matches that of a place Sheriff Scott said he used for storage: a one-story brick home about a mile from the jail. Sheriff Scott said it was widely known that he used the house and that lots of people let themselves in and out using a key he kept under the doormat.

Ms. Jones shared account records showing that past midnight on Jan. 25, a week after she left jail, Sheriff Scott sent her a friend request on Snapchat, the disappearing-photo app. She also shared copies of text messages between them.

In the texts, Sheriff Scott asked Ms. Jones for “updates,” his code for nude photographs, she said. She felt forced to send them, she said, because her brother was in jail for drug possession.

In one text exchange from 2019, Ms. Jones asked the sheriff if he had heard anything about her criminal record being expunged. A “good update” would “help me remember,” he replied, adding a smiling emoji. In another exchange, the sheriff wrote that Ms. Jones owed him an “update” and sent her an emoji with a tongue sticking out.

Sheriff Scott said he couldn’t remember what he had meant by “update,” but denied that it involved nude pictures.

The only photos he received from Ms. Jones over Snapchat, he said, were “body shots” that he had requested from her as part of an investigation into jail inmates tattooing one another. Sheriff Scott said he had provided those photos to the F.B.I.

Two women, including another female inmate, had seen her in the house where she said the sheriff took her for sex.

On one occasion, she said, the sheriff drove her and the other jailed woman there, had them remove their clothing and gave them boxer shorts to put on. Ms. Jones’s were Superman-themed, with a cape to cover the otherwise-bare back, she said; the other woman received a “Duck Dynasty” pair.

Sheriff Scott posed the women together and snapped a photo from behind, according to Ms. Jones. The other woman, visibly upset, bolted for the bathroom, she said.

A few minutes later, Ms. Jones said she heard a knock at the door: It was Ms. Stange, the jail records administrator.

Ms. Stange said in a statement that she drove the women back from the house to the jail and they seemed in good spirits. She said she had no knowledge of “any sexual misconduct of Sheriff Scott with any female inmates.”

The second woman declined to comment. But in a Facebook post last year, she appeared to confirm that she had been present for the picture. Replying to a post by Ms. Jones describing the events, the woman recalled that she had said, “Oh, hell no,” and walked out of the room.

When asked about this under oath, Sheriff Scott took the Fifth.

For years after her release from jail, Ms. Jones said she tried to put these abuses behind her. She stopped getting messages from the sheriff after blocking his number near the beginning of 2020, she said.

Then, in September 2021, a woman who had worked for the Clay County Sheriff’s Office came forward with new accusations that threatened to bring attention to years of alleged sexual misconduct by Sheriff Scott.

Caitlyn Wilson, a former investigative assistant who alleged sexual harassment, filed an Equal Employment Opportunity Commission complaint that said Sheriff Scott had made sexual advances toward her and threatened to fire her after she rebuked him. She made reference to other women whose similar experiences had not yet been made public.

“My situation has been exacerbated,” her complaint said, citing multiple women either in jail or employed by the county who had “made claims that the Sheriff was having sex with them. It appears to be well-known within the County that the Sheriff suffers from a sexual addiction, and this sexual addiction has affected my work performance and is causing me extreme fear and anxiety.”

The E.E.O.C. did not weigh in on the merits of Ms. Wilson’s complaint, but determined she had the right to sue.

In the lawsuit she filed in May 2022, Ms. Wilson described a group chat in which Sheriff Scott had sent several employees a steady stream of sexually explicit text messages.

His messages, reviewed by reporters, referred to women as “hookers,” “heifers” and “hos.” In one text, the sheriff suggested Ms. Wilson and Ms. Stange should “tag team” to give him oral sex. In others, he called himself a stallion and said women “liked to be hammered.”

Pictures the sheriff sent, which he called “humorous memes on the humor channel” under oath as part of the lawsuit, compared women to dogs that needed to be trained and joked about date rape.

Ms. Wilson said she decided to file her complaint after Sheriff Scott rubbed his crotch against her as he walked past her one day in the office. “I felt very violated,” she said in an interview. “I was just so shocked and surprised because he was my boss.”

Sheriff Scott denied touching Ms. Wilson inappropriately, saying he was running a high fever that day. “I was as sick as a dog,” he said. “Grabbing a woman was the last thing on my mind.”

He told reporters that none of his texts included sexual content and said under oath that anyone in the group chat could have stopped participating at any time.

When Ms. Wilson filed her complaint, Sheriff Scott assigned one of his own deputies to investigate. The final report concluded that the allegations were “unsubstantiated and punitive” and dismissed Sheriff Scott’s texts as adult humor shared among willing participants.

As the deputy investigated, Ms. Wilson said, she found herself increasingly isolated at work. She was barred from carrying her gun at the office and told to eat lunch at her desk. Most of her co-workers stopped talking to her, she said.

In December 2021, three months after Ms. Wilson filed her initial complaint, Sheriff Scott suspended her then-boyfriend, Jeremy Bell, a captain who had worked in the office for five years. According to a personnel report signed by Sheriff Scott, Mr. Bell had violated department policy by driving his patrol car outside of Clay County to visit Ms. Wilson’s house in a neighboring town. He was fired two days after Christmas.

It was around this time that Ms. Jones, who had not heard from Sheriff Scott for months, found herself under the scrutiny of local law enforcement again, she said.

Several weeks after Ms. Wilson submitted her complaint citing allegations that women in the jail had been forced to have sex with Sheriff Scott, Ms. Jones was pulled over by a narcotics officer from West Point, a town of about 10,000 people in Clay County.

The officer discovered a bag of diabetic needles filled with meth under her passenger seat and arrested her. Ms. Jones believes the drugs were planted there.

“I knew I was being set up,” she said.

Frustrated and facing time behind bars, Ms. Jones decided two months later to post on a Facebook page called Mississippi Corruption, where she detailed for the first time her allegations against the sheriff.

“I was fixing to go to prison for a really long time for something that I didn’t even do, just because he was mad over his mistakes, over things that he had done,” she said.

A few months later, in April 2022, Ms. Jones received a video from her friend Madison Ray, she said. Ms. Ray said she had secretly recorded a conversation with Joshua Fulgham, a local diabetic man with prior drug arrests, because she suspected someone had planted the drugs while they were all hanging out the night before Ms. Jones’s arrest.

The recording, on Ms. Ray’s cellphone, captures him explaining how and why he placed the drugs in Ms. Jones’s car. “I put dope under that seat like Kyle told me to,” he says. “I didn’t even have to use mine. Kyle gave it to me.”

According to Ms. Wilson’s lawsuit, Mr. Fulgham is referring to Deputy Kyle Eaves, who used to work for Sheriff Scott. “The apparent purpose of Deputy Sheriff Eaves causing drugs to be planted upon Jones is to intimidate Jones or to cause her to be arrested so that she will lack credibility in claiming an involuntary sexual relationship with Defendant Scott,” the complaint states.

After the video spread around town, Mr. Fulgham was arrested on drug possession charges, taken to the jail and made a trusty. About six months later, he made a video at the Clay County jail and had it posted on Facebook. He accused Ms. Jones of being a liar out to get Sheriff Scott, but never recanted his previous statements.

“She needs help and rehab, just like me,” Mr. Fulgham said in the video, “and she needs to leave the sheriff alone.”

The sheriff sent a copy of the video to reporters and pointed to it as proof that Ms. Jones and others were lying. “Seems like their plan [is] coming to light,” he said.

Neither Mr. Fulgham nor Mr. Eaves responded to requests for comment.

About six months after the video was made, another potential witness in Ms. Jones’s case changed his story too.

Her former boyfriend, Edward Adam Todd, had been arrested by Clay County deputies and was facing up to 50 years in prison for two burglary charges.

After initially backing up Ms. Jones’s allegations, Mr. Todd later told investigators that he had lied to get the sheriff in trouble, according to transcripts of his April sentencing hearing.

The court transcript shows that Judge Kitchens praised Mr. Todd for his change of heart, saying his statements “cleared a local member of law enforcement that had been accused of something that probably turns out that was not true.”

At the hearing, the prosecutor suggested a seven-year prison sentence for Mr. Todd, citing his help to law enforcement. Judge Kitchens further reduced his sentence, cutting it to four years.

Instead of being transferred to prison to serve his sentence, Mr. Todd has remained at the Clay County jail, where he could not immediately be reached for comment.

Sheriff Scott believes that he will be vindicated and that voters will see through the allegations to re-elect him in the deciding Democratic primary election on Aug. 8.

He has won his previous elections easily. But this time, he faces an unexpected opponent who is an experienced law enforcement officer in Clay County: his own chief deputy, Ramirez Williams.

In February, Chief Deputy Williams announced his run for sheriff. The next month, Sheriff Scott demoted him to work the graveyard shift as a jailer.

When asked if Mr. Williams’s candidacy played a role in his demotion, the sheriff replied, “Not necessarily,” and declined to comment further.

Sheriff Scott insists he will leave office on his own terms, regardless of what becomes of the accusations against him.

He said he believes the federal investigation is over and he cooperated with their review, even voluntarily meeting with federal authorities to answer questions. “I wasn’t going to let a bunch of drugheads run me out of office,” he said.

The sheriff said he had been burned by extending compassion to people behind bars, but had no plans to stop. “You can’t turn your back,” he said. “One of these days, I might be in the same shape.”

He chuckled. “You never know.”

This article was co-reported by The New York Times and the Mississippi Center for Investigative Reporting at Mississippi Today.