BEIRUT — One evening in the early days of Syria’s uprising, Mohsen al-Masri’s band of activists slipped through the Damascus streets and waited for the coast to clear. Then they crouched, opened their bags and let out a stream of color.

Thousands of ping-pong balls, painted green, pink, blue and yellow, bounced past policemen, who scrambled to stop them. Residents would find balls tucked in nooks and crannies for months. Each was marked with a single word: “Freedom.”

The punishment for Masri’s acts of peaceful protest would begin a journey into hell, unusual not because of what he saw, but because he survived.

In a series of interviews, he described how he was tortured and interrogated over a two-year period in four detention facilities before arriving in a hospital at the heart of a nationwide system of brutality.

The hospital, known as 601, is not the only site of torture in Syria. But after it was seen in a cache of photographs showing thousands of skeletal corpses, it became one of the most notorious.

Inside the facility, about a half-mile from Syrian President Bashar al-Assad’s palace, sick prisoners are tortured as they lie shackled to beds crammed with dying men, according to Masri and former detainees and military personnel who worked there. Corpses have been piled in bathrooms, outhouses and anywhere else they will fit, then meticulously documented and trucked away for mass burial.

In interviews across Lebanon, Turkey and Europe, more than a dozen survivors and army defectors described horrors in Syrian military hospitals across the country for which war crimes lawyers say they have struggled to find a modern parallel.

The former detainees come from all walks of life. Elite, ­working-class, leftist and Islamist, their only connection to one another was involvement in Syria’s 2011 uprising. Some were its instigators. Others said they had simply commented on the Facebook statuses of friends who supported protests.

Investigators say that testimony and documentation from Syria’s military hospitals offer some of the most concrete evidence to date of crimes against humanity that could one day see senior government figures tried in court.

“We were swept into a system that was ready for us. Even the hospitals were slaughterhouses,” Masri said in an interview last month.

Medicine has been used as a weapon of war since the earliest days of the uprising, when pro-government doctors performed amputations on protesters for minor injuries.

Military hospitals across Syria have long set aside wards for prisoners. But since 2011, these have been packed with men left starving and broken by the conditions they have already endured.

More than 100,000 people have been arrested or forcibly disappeared in Syria since the country’s revolt began, according to a list compiled by the Syrian Network for Human Rights, a monitoring group. During that time, international aid groups have gotten access to only a handful of prisons with the government’s permission, none of which the detainees interviewed by The Washington Post spent time in.

Masri’s ordeal began in the spring of 2012 when he was arrested on his way to a conference in Turkey. Repeatedly tortured as he was transferred from jail to jail, he arrived at Sednaya, one of the most feared.

In a report published in February, Amnesty International said torture and forced starvation are systematic at the prison. But Masri said that prisoners learned to stay silent when guards asked who needed to go to the hospital.

“It didn’t matter what they did to us; we had to pretend we were fine. People rarely came back from those trips,” he said.

After months of starvation, Masri’s name was added to the weekly transfer list. As darkness fell on an evening in May 2012, he was chained to another man and taken to trucks outside. Attaching a number to Masri’s body, a guard told him to forget his name. Then he was blindfolded.

Everyone gets the “welcome” party, Masri said — a savage beating involving guards and medical staffers wearing white coats over military uniforms. In Hospital 601, the weakest man was pushed to the floor and brutalized first. In the nearby Tishreen Military Hospital, a former technician at the facility, Mohammed al-Hammoud, said he had seen prisoners dragged down steps by the hair.

“Everything was about control,” said Somar Mustafa, a physics student from Damascus who was sent to Hospital 601 at the end of 2012. Inside, he saw detainees chained to their beds and packed so tightly that they sat with their knees jutting into their rib cages.

Bathroom breaks were so rare that prisoners would defecate where they sat, remaining in the same spot for days. “We were blindfolded with that smell all around us. You can’t shake the memory of it, even when you leave,” Mustafa said.

At least five branches of the Syrian security forces have operated wards inside Hospital 601 since 2011, according to the U.N. Commission of Inquiry, a body set up to monitor the conflict. “Detainees, including children, have been beaten, burned with cigarettes, and subjected to torture that exploits preexisting injuries,” it said in a 2013 report. The commission concluded that many patients had been tortured to death inside the facility.

The Harasta Military Hospital, also in Damascus, moved its ward from the first floor to the seventh to prevent detainees from escaping, a defector said. “It was the only floor without an elevator, and we knew they couldn’t jump out the window.”

Investigators say the abuses could become central pillars in any eventual case for prosecution of the hospitals’ doctors, as well as senior figures in the Syrian government.

In 601, Masri and Mustafa said, they saw high-ranking officers from the security branches accompanying doctors on their rounds. Sometimes the teams would pause by a prisoner to discuss his treatment. Other times the men would beat him.

The doctors were helped by service staffers in blue uniforms, many of them former supporters of the revolt who had been co-opted by their jailers. “Our best men had been broken by torture. If they didn’t beat us, they risked a worse fate themselves,” Masri said.

The guards went by nicknames to avoid identification. Four survivors said the most famous was known as Azrael, or the Angel of Death. They described him as a thickset man from Assad’s coastal stronghold of Latakia who carried a stick laced with razor blades. They said he selected prisoners, most of them deathly ill, for a fate he called “justice.” The detainees called it execution.

Masri recalled Azrael taking a lighter to a plastic bag and melting it drop by drop onto a prisoner’s face until he died, apparently of a heart attack. Other prisoners said he used an iron rod to smash their bedmates’ skulls.

Many died where they lay, slumped against their bedmates until morning came. For Mustafa in the winter of 2012, that meant sharing a bed until sunrise the next day with three corpses.

As the uprising outside morphed into a war, former prisoners say, their interrogators became obsessed with the notion of accomplices, torturing prisoners to extract the names of new suspects to arrest.

Documents signed by senior government and security officials acknowledged the upsurge in deaths, at times complaining that the bodies were building up.

“It’s impossible to interrogate, torture and kill tens of thousands of detainees without a system in place,” said Scott Gilmore, a staff attorney at the Center for Justice and Accountability. “Before the revolution, the regime was not generating thousands of dead bodies. Then all of a sudden it was. So what did you do with them?”

A December 2012 order signed by the head of Syria’s military intelligence department instructed every security branch to send their dead to a military hospital’s morgue. The document, obtained by the Commission for International Justice and Accountability, a Europe-based investigative unit, said that each body should be examined and logged.

A trove of these photographs was published around the world in 2014, after being smuggled out of Syria by a military police defector known only by his code-name, Caesar. Most were taken inside Hospital 601. Skeletal bodies of children as young as 11 bore signs of torture, with eyes gouged out and limbs drilled through and burned. Following Syrian government protocol, Caesar had methodically documented the deaths of some 11,000 people.

“You have to realize that these were just the photographs taken by a single man during a single period, and even then, they were only a fraction of what he’d actually recorded,” said Nadim Houry, who examined the photographs for Human Rights Watch.

Assad recently described the images as “fake news,” suggesting they had been doctored to suit the aims of human rights groups.

But defectors describe hauling numbered bodies into transparent bags in Hospital 601 and nearby military hospitals in Tishreen and Harasta. Investigators from the United Nations and private law firms have collected similar testimony from the cities of Homs, Aleppo and Daraa.

By late 2012, the system had buckled, and the December order berated individual military departments for failing to register their dead on time.

Those who survive are funneled back to nearby jails, Masri said. Others, like Mustafa, are released to a Damascus court packed with prisoners and dismissed from custody on the spot, after a judge acknowledges that they had been forced to make false confessions under torture. The young man said he remembers falling into the arms of his sobbing parents.

Masri’s discharge from 601 sent him back to Sednaya. Another year of torture followed, with nights spent packed next to other men in the darkness. He felt forgotten.

In the winter of 2014, he dreamed he was taking a hot shower, its stream stripping back two years of dirt and leaving him clean. He woke to find a guard in his cell. “He told me it was time to go,” Masri said. “I cannot describe that feeling. It was too much, too big. Indescribable.”

Back home in Damascus, he said, he remembers closing the bathroom door to stand alone for a moment, shutting his eyes to finally feel at peace. When he opened them, he saw a sheet-white, rawboned man staring back from the mirror.

“I started screaming,” Masri said. He did not recognize himself.

Zakaria reported from Istanbul. Heba Habib in Stockholm and Hania Mourtada in Beirut contributed to this report.