Pallbearers carry the casket of 6-year-old Jeremy Mardis in Beaumont, Miss., on Nov. 9. (Eli Baylis/Associated Press)

For years, people in the tiny Louisiana town of Marksville watched the feud between their mayor and local judge like some kind of daytime soap opera, with varying degrees of frustration and amusement.

Then came the Nov. 3 shooting that killed a 6-year-old boy. Suddenly, the petty small-town bickering began looking more tragically sinister.

Why in the world, residents ask, were deputy marshals — whose main job is serving court papers for the judge — out there chasing cars and shooting up suspects? How did one of the deputies — who had been charged twice for aggravated rape and racked up a string of lawsuits accusing him of using excessive force — even get hired? And how did a speck of a town like Marksville wind up with a shadow police force on its streets?

“It’s pretty clear to me that if this feud didn’t exist, those marshals wouldn’t have been there that day,” said one former city official and resident of more than three decades who spoke on the condition of anonymity, citing a gag order in the case.

“We’ve watched the both of them fight for years. . . . But I don’t think anyone imagined something so petty would lead to something so tragic.”

Marksville Deputy Marshal Derrick Stafford. (Louisiana State Police/Associated Press)

Jeremy Mardis was the youngest person shot and killed by law officers so far this year, according to a Washington Post database tracking such shootings. Amid a national debate over police use of deadly force, the killing of an autistic 6-year-old sent shock waves nationwide.

Louisiana State Police said they are still trying to figure out why deputies were chasing an SUV driven by Jeremy’s father, Chris Few. Few was not armed and was not the subject of any arrest warrant.

When the chase ended, the two deputies — Derrick Stafford, 32, and Norris Greenhouse Jr., 23 — fired at least 18 bullets into Few’s SUV, police said. Five shots hit Jeremy, a first-grader strapped into the front seat beside his father. Few was critically injured; his attorney told reporters that he was recently released from the hospital.

Two police officers who work for the mayor arrived during the shooting; one of them was wearing a body camera. The footage “is one of the most disturbing videos I’ve ever seen,” State Police Col. Mike Edmonson said.

“It troubled me as a police officer and as a father. There’s no reason that boy deserved to die like that,” Edmonson said. Few’s attorney told reporters that the video shows the father with his hands in the air as the deputies open fire.

Stafford and Greenhouse have been arrested and charged with second-degree murder. A judge overseeing the case has issued a gag order, prohibiting those involved and potential witnesses from talking to reporters.

Since then, information about the case and Marksville more generally has slowed to a trickle, with folks in town refusing to talk openly about almost anything. In private interviews, however, many blamed the long-running feud for Jeremy’s death. It may not have directly caused the shooting, they say, but it created the bizarre circumstances that made it possible.

Marksville Deputy Marshal Norris Greenhouse Jr. (Louisiana State Police/Associated Press)

With a population of 5,500 and a median income of $26,700, Marksville is small, rural and relatively poor. Like most towns in Louisiana, it has a local marshal, an elected position with no police training or experience required.

The marshal’s job is to serve court papers: subpoenas, warrants, notices of nonpayment. For years in Marksville, the marshal has been a local bus driver, Floyd Voinche Sr., who carried out his duties with one full-time employee and one part-timer, according to a statewide marshals directory.

But sometime in the past two months, that changed.

Mayor John Lemoine told reporters that Voinche’s office bought two used police cruisers, hired several part-time deputies, and started patrolling the streets and issuing tickets like regular city police. In a September letter to Louisiana’s attorney general, Lemoine asked whether the marshal’s sudden expansion of duties was legal.

Voinche has refused to explain his actions, issuing a terse statement citing a Louisiana law that empowers deputy marshals “in making arrests and preserving the peace.”

“The statute gives us the same authority as a sheriff,” said Joey Alcede, a marshal in Lake Charles and an official with the state marshals association. Having marshals take on the duties of city police is highly unusual, however, Alcede said.

According to several current and former city officials, who spoke on the condition of anonymity for fear of violating the gag order, Marksville’s marshal began issuing traffic tickets to generate money for the city court. The court’s funding has been the focus of a furious battle between the mayor and City Judge Angelo Piazza III since last year.

“No one really took it seriously, until recently. It was like watching two bullies fighting,” said one resident who has known both men for decades.

Piazza, 57, has reigned over the Marksville City Court for more than two decades. A Civil War buff known for hauling authentic cannons to reenactments, Piazza sued the city in 1997 over funding. When Lemoine, 63, a mechanic and auto parts shop owner, was elected mayor in 2010, he announced plans to tighten Marksville’s budget, and war fully bloomed.

“Lemoine put a microscope on City Court,” Piazza told the local paper, the Avoyelles Journal, last year. Piazza said the scrutiny added new costs and bureaucracy, even as Marksville police started issuing fewer tickets, dramatically reducing his court’s income.

Then this summer, Lemoine sharply cut the court’s budget — including the judge’s salary. Piazza filed suit. Piazza declined to comment for this story. Lemoine and Voinche did not return repeated calls for comment.

The feud polarized the town’s law enforcement community. “You have officers siding with the judge and marshal, and others with the mayor,” said one longtime elected official.

At one point, the mayor was arrested after an argument with police. One of the arresting officers was Stafford, and afterward the mayor tried to get a civil service oversight board to investigate him.

Both Stafford and Greenhouse were moonlighting as deputy marshals when they opened fire on Nov. 3. Stafford was a Marksville police officer; Greenhouse is a reserve Marksville officer and deputy marshal in neighboring Alexandria. It is unclear when or how they joined Marksville’s newly expanded marshal service. Many have questioned Stafford’s hiring in particular.

“This is a guy I think a lot of us would have trouble hiring,” said a law enforcement chief in a neighboring jurisdiction.

Stafford has been charged twice with aggravated rape in nearby Rapides Parish. According to the indictment, one 15-year-old victim said Stafford committed rape on the victim’s birthday in 2004. In a separate incident, a second victim said Stafford committed rape in 2011.

In 2012, the charges were inexplicably dropped. In court documents, the attorney listed as representing Stafford is Piazza, the same judge he now works under as a deputy marshal.

Monique Metoyer, who prosecuted the rape case, declined to explain why the charges were dropped. But she confirmed that Marksville’s judge served as Stafford’s lawyer.

Stafford has also been accused in civil court of using excessive force; at least five lawsuits are pending against him. The accusations include throwing an already handcuffed woman into a back seat and using a stun gun on her, breaking the arm of a 15-year-old girl, and arresting a man in retribution for filing a formal complaint against Stafford for yelling at his family.

Greenhouse has been accused alongside Stafford in two excessive force cases. And in an example of the messy overlap common in small-town government, Greenhouse’s father works for the local district attorney, who had to recuse himself from prosecuting Stafford and Greenhouse in the shooting.

Greenhouse also appears to have a personal connection to Few and his girlfriend, Megan Dixon. Dixon told the Advocate newspaper in Baton Rouge that she went to high school with Greenhouse and that he had recently messaged her on Facebook and stopped by the house where she lived with Few.

“I told Chris, and Chris confronted him about it and told him, ‘Next time you come to my house, I’m going to hurt you,’ ” Dixon said.

With the gag order in place, it is unclear when authorities will release additional information about the shooting, including the body camera footage. No trial date has been set. Equally unclear is what will happen to the newly expanded marshal service.

Meanwhile, the family of Jeremy Mardis held a private funeral for the first-grader last week in his hometown of Hattiesburg, Miss. Under a chilly gray sky, the family placed his small coffin inside a hearse and headed to nearby Beaumont Cemetery to bury him.

Julie Tate and Amy Brittain contributed to this report.