Three weeks.

That’s how long Carlos Alfredo Rueda Cruz went without prescription medication while he was detained at West County Detention Facility in Richmond, according to medical records his attorney obtained from the jail and shared with me.

Cruz was being detained by our federal government for being in the U.S. without immigration documentation. He said he was injured — shoulder and neck pain and swelling — as the result of being brutally handled by ICE agents at a field office in Sacramento in late September. ICE denies this.

But no one can explain why Cruz, while in ICE custody, didn’t get the medication he was prescribed for pain and inflammation during an emergency room visit at San Francisco General Hospital on Oct. 2.

Let me start Cruz’s story from the beginning, as told to me by Cruz and his attorney, Luis Angel Reyes Savalza, an immigration attorney for Pangea Legal Services. First, a few notes about Cruz: He’s a 27-year-old married father of three children. He has no criminal record. He’s a Mexican citizen, living in the U.S. without documentation since 2014.

On March 3, 2017, ICE agents pulled Cruz over in Sacramento as he was on his way to work for a local roofing company. He was released the same day on an order of supervision, which meant he had to check in monthly at the Sacramento ICE office.

The order included the requirement that Cruz report undocumented immigrants committing crimes to ICE.

Cruz didn’t have any names to report, and each month he checked in, he said, ICE agents grew more agitated because he wasn’t providing information.

On Sept. 26, Cruz went to his monthly ICE check-in. There, he and his attorney say, two ICE agents, frustrated that he had no information, tried to force him to sign an order that would have reinstated his deportation and waived his right for a hearing before an immigration judge. Cruz and his lawyer say a third ICE agent entered the interrogation room he was in and the agents pulled Cruz’s arms behind his back as they tried to force his fingerprint onto a document.

Cruz wants to ask a judge for approval to stay in the U.S. on grounds that returning to Mexico would lead to persecution or torture. After he refused to cooperate, they detained him at the Rio Cosumnes Correctional Center in Sacramento.

The next day, on Sept. 27, Cruz was brought back to the Sacramento ICE office, where he says four agents teamed up to pull both his arms from behind in an attempt to force him to fingerprint the document. He said they grabbed him by the neck and smashed his head into the desk and twisted and pulled his arms behind him, injuring both his shoulders.

Cruz screamed and cried so loudly that, according to his attorney, other detainees heard the screams and begged the agents to stop.

Cruz was told if he didn’t sign that his family would be deported.

“My officer told me that they were going to pick up my spouse and my kids,” Cruz told me. “When I called (my family), I told them they had to get out of there.”

His wife, Heidi, 26, stopped sending two of their sons to school. She was pregnant with their third son and missed prenatal appointments. She had repeated asthma attacks.

“I spent all the time looking out the window seeing if they were going to come for me, come for my kids,” said Heidi, who moved in with family members. “I thought that at any moment they could show up. Just like they took him, they could take me, take my kids.”

The following day, on Sept. 28, ICE transferred Cruz to the detention facility in Richmond, the Contra Costa County jail that has a contract with ICE to house detainees. That day the medical staff at the detention facility prescribed pain medication for Cruz, records show. On Oct. 2, records show he was taken to San Francisco General Hospital, where an emergency room doctor treated him for bilateral shoulder pain and inflammation.

He was prescribed one 600mg ibuprofen pill every six hours for inflammation and two 325mg Tylenol tablets every four to six hours for pain, records show.

But records show that once back at West County, Cruz didn’t receive his medication for 21 days — from Oct. 3-24.

That’s right, for three weeks the medical staff at the detention facility didn’t give him his meds, and Cruz says his pleas for help were ignored by jail staff.

There were many nights Cruz couldn’t sleep at the detention facility. Climbing into the top bunk was painful, and it was agony trying to get comfortable on the mattress that was almost as thin as a newsstand magazine. He says he didn’t have a pillow.

He says he asked the jail guards to call the medical department. Twice he says he talked directly to the medical staff.

“When I met with them, and I asked them about the medicine, because I was in a lot of pain, the doctors said they still needed authorization from a doctor before they could give me medicine,” said Cruz, who still has trouble raising his arms above his shoulders and lifting heavy items, like stacks of roof tiles.

According to medical records, on more than one occasion Cruz was a “no-show” for his medicine.

“It’s concerning, because they’re under the custody of immigration,” said Savalza. “For them to say that they’re not able to find a patient that’s in their custody — or he’s not available when he’s in their custody is concerning, to say the least.”

Is it possible that housing, on average, about 200 people per day for ICE, many of whom don’t speak English, has overwhelmed county resources and created an atmosphere where it’s difficult to provide even the most basic health services like handing out pills?

When asked for a comment, the sheriff’s office — which runs the jail — referred me to Contra Costa Health Services, the county’s public health system which, according to the sheriff’s spokesperson, handles the care of inmates. A communications officer for the department didn’t respond to my questions.

On Oct. 24, after written complaints from Savalza, Cruz was given a bottle with 24 pills and a topical cream. He was released on Nov. 21 on an order of supervision. He’s back to checking in with ICE monthly and waiting for a hearing before an immigration judge — a hearing scheduled for Sept. 4, 2019.

Last month I visited Cruz, who is living with his brother in the South Hagginwood neighborhood of Sacramento. I was joined by Savalza, who translated our conversations.

That morning Cruz had his ankle monitor removed. ICE had originally wanted him to wear it until his 2019 immigration hearing. Two of Cruz’s sisters were there, and several children played in the backyard as the adults ate menudo, a traditional Mexican soup, as well as handmade tortillas and salsa.

Savalza told me they’re exploring a lawsuit for damages. ICE has denied wrongdoing.

“I have personally reviewed this case and the allegation that your client was physically assaulted and forced to sign a document is unfounded,” Dana L. Fishburn, a deputy field office director in San Francisco’s ICE office, wrote in an email to Pangea Legal Services. “As you are aware, this is a serious allegation, the safety and welfare of all aliens in custody is of the upmost importance to ICE.”

It didn’t feel like that to Cruz. I asked him how it felt to be home.

“I don’t have the words to describe how good it feels to be out of there,” he said. “It was just really hard being in there.”

I’ve written about the abuse of female ICE detainees at the jail, and about an inmate who said she and her friend were raped by a deputy who has been arrested on suspicion of “consensual sex” with inmates.

And now, there’s this.

San Francisco Chronicle columnist Otis R. Taylor Jr. appears Mondays and Thursdays. Email: otaylor@sfchronicle.com Twitter: @otisrtaylorjr