A former Santa Rita Jail inmate is suing Alameda County and four former sheriff’s deputies for “despicable” attacks that included a plot to repeatedly douse him with feces and urine, according to a federal lawsuit filed Tuesday.

Fernando Miguel Soria accused the deputies of excessive force during his time in lockup, denial of medical attention and a conspiracy to violate his civil rights.

Soria, flanked by his mother and attorneys Tuesday outside the Alameda County courthouse in downtown Oakland, trembled at times as he spoke to reporters. He said he was sprayed with human waste about seven to eight times over the course of several months in 2016, but it’s unclear why he was singled out.

“I can’t figure that out,” Soria said. “That’s something I’ll have to work out with a psychologist or something.”

The deputies named in the lawsuit — Justin Linn, Erik McDermott, Stephen Sarcos and Sarah Krause — were all arrested last year by their own agency. Officials said the four deputies allowed one inmate to participate in “gassing,” which means filling a bottle with body fluids and spraying its contents onto someone else.

Prosecutors with the Alameda County district attorney’s office charged them with six counts of assault by a public officer for the alleged attacks on Soria and other inmates. The deputies no longer work for the Sheriff’s Office, said Sgt. Ray Kelly, a spokesman for the agency.

Civil rights attorney John Burris, whose firm is representing Soria, commended the Sheriff’s Office and district attorney for holding the deputies criminally accountable. But, he noted, Soria should also be compensated for the mistreatment.

“It’s important that we vindicate the civil rights of Mr. Soria,” Burris said, adding that “he did not deserve for this to happen to him.”

Soria was not only subject to “gassing,” his attorney said, but he also suffered a broken arm while in jail but received no medical treatment in a timely fashion.

Soria was booked into jail in August 2016 for allegedly resisting arrest after an incident in San Leandro where he was trying to get a prescription refilled.

The lawsuit claims that between September and November 2016 deputies created a plan to gas Soria with waste kept in a shampoo bottle.

The deputies encouraged another inmate known as “Preacher” to gas Soria while he was in his cell, the lawsuit alleges, and they even opened Soria’s cell to assist Preacher.

The suit claims Soria was not allowed to shower after the attacks and could only clean himself with the toilet water in his cell.

Soria contracted hepatitis C due to the assaults, his attorneys said.

The suit asks for “compensatory and punitive damages,” but does not specify a dollar figure.

Two of the former deputies, Krause and Sarcos, have already admitted to the conspiracy, the lawsuit states.

The Sheriff’s Office and an attorney for the county declined to comment on the case, both citing the pending felony charges.

Alameda County prosecutors last week filed criminal charges against another Sheriff’s Office employee, in a separate case also involving the treatment of detainees. Sgt. James Russell faces four felony counts of eavesdropping after allegedly recording privileged conversations between juvenile suspects and their attorneys.

Russell is due in court Oct. 17. The four former deputies accused in the gassing case are scheduled for preliminary hearings in January.

Megan Cassidy is a San Francisco Chronicle staff writer. Email: megan.cassidy@sfchronicle.com Twitter: @meganrcassidy