In a military hospital, he said, he watched a nurse bash the face of an amputee who begged for painkillers. In yet another prison, he counted 19 cellmates who died from disease, torture and neglect in a single month. "I was among the lucky," said Ghabbash, 31, who survived 19 months in detention until a judge was bribed to free him. Satellite image provided by Amnesty International shows the military-run Saydnaya Prison, in 2010, left, and 2016, right, near Damascus, Syria. Amnesty International said they show an expanding cemetery, evidence of mass killings there. Credit:Amnesty International As Syria's president, Bashar Assad, closes in on victory over an eight-year revolt, a secret, industrial-scale system of arbitrary arrests and torture prisons has been pivotal to his success. While the Syrian military, backed by Russia and Iran, fought armed rebels for territory, the government waged a ruthless war on civilians, throwing hundreds of thousands into filthy dungeons where thousands were tortured and killed. Nearly 128,000 have never emerged, and are presumed to be either dead or still in custody, according to the Syrian Network for Human Rights, an independent monitoring group that keeps the most rigorous tally. Nearly 14,000 were "killed under torture." Many prisoners die from conditions so dire that a UN investigation labelled the process "extermination".

Now, even as the war winds down, the world's attention fades and countries start to normalise relations with Syria, the pace of new arrests, torture and execution is increasing. Detainees have recently smuggled out warnings that hundreds are being sent to an execution site, Saydnaya Prison, and newly released prisoners report that killings there are accelerating. The Syrian government has denied the existence of systematic abuse. However, newly discovered government memos show that Syrian officials who report directly to Assad ordered mass detentions and knew of atrocities. Mazen Darwish, a Syrian human rights lawyer, and his wife, Yara Bader, a Syrian journalist and human rights activist, were both imprisoned in Syria. Credit:Laura Boushnak/The New York Times War crimes investigators with the nonprofit Commission for International Justice and Accountability, or CIJA, have found government memos ordering crackdowns and discussing deaths in detention. The memos were signed by top security officials, including members of the Central Crisis Management Committee, which reports directly to Assad. A military intelligence memo acknowledges deaths from torture and filthy conditions. Other memos report deaths of detainees, some later identified among photos of corpses smuggled out by a military police defector. Two memos authorise "harsh" treatment of specific detainees. A memo from the head of military intelligence, Rafiq Shehadeh, orders officers to take steps to ensure "judicial immunity" for security officials.

In an interview in 2016, Assad cast doubt on the truthfulness of survivors and the families of the missing. Any abuses, he said, were isolated mistakes unavoidable in a war. Over seven years, The New York Times has interviewed dozens of survivors and relatives of dead and missing detainees, reviewed government documents and examined hundreds of pages of witness testimony. The survivors' accounts align with accounts from other prisoners held in the same jails, and are supported by the government memos and by photos smuggled out of Syrian prisons. Riyad Avlar, a Turkish citizen, was imprisoned in Syria for 20 years after being arrested as a 19-year-old student for interviewing Syrians about a prison massacre. Credit:Laura Boushnak/The New York Times There is little hope for holding top officials accountable anytime soon. But there is a growing movement to seek justice through European courts. French and German prosecutors have arrested three former security officials and issued international arrest warrants for Syria's national security chief, Ali Mamlouk; its air force intelligence director, Jamil Hassan; and others for torture and deaths in prison of citizens or residents of those countries. Yet Assad and his lieutenants remain in power, safe from arrest, protected by Russia with its military might and its veto in the UN Security Council. At the same time, Arab states are restoring relations with Damascus and European countries are considering following suit.

That impunity is not just a domestic Syrian problem. Without security reforms, the 5 million Syrian refugees in the Middle East and Europe are unlikely to return home to risk arbitrary arrest. "Justice is not a Syrian luxury," Mazen Darwish, a Syrian human rights lawyer, said in Berlin, where he has assisted prosecutors. "It's the world's problem." An Expanding Gulag It was the detention and torture of several teenagers in March 2011, for scrawling graffiti critical of Assad, that pushed Syrians to join the uprisings then sweeping Arab countries. Demonstrations protesting their treatment spread from their hometown, Daraa, leading to more arrests, which galvanised more protests. A flood of detainees from all over Syria joined the dissidents at Saydnaya Prison. The new detainees ranged "from the garbageman to the peasant to the engineer to the doctor, all classes of Syrians," said Riyad Avlar, a Turkish citizen who was held for 20 years after being arrested in 1996, as a 19-year-old student, for interviewing Syrians about a prison massacre.

Torture increased, he said; the newcomers were sexually assaulted, beaten on the genitals, and forced to beat or even kill one another. No one knows exactly how many Syrians have passed through the system since; rights groups estimate hundreds of thousands to a million. The Syrian Network's tally of 127,916 people currently caught in the system is probably an undercount. The number, a count of arrests reported by detainees' families and other witnesses, does not include people later released or confirmed dead. Mariam Khleif, a mother of five, said she was repeatedly raped during a month in prison in Syria. Credit:Laura Boushnak/The New York Times Because of government secrecy, no one knows how many have died in custody, but thousands of deaths were recorded in memos and photographs. A former military police officer, known only as Caesar to protect his safety, fled Syria with pictures of at least 6700 corpses, bone-thin and battered, which shocked the world when they emerged in 2014. A Tour of Torture

Ghabbash, the protest organiser from Aleppo, survived torture at at least 12 facilities, making him, he says, "a tour guide" to the system. His odyssey began in 2011, when he was 22. Ghabbash was hung up, beaten and whipped in a string of military and general intelligence facilities, he said. In March 2012, Ghabbash was flown to Mezze military air base, named for a well-off Damascus neighbourhood nearby. By then, he and numerous survivors said, there was an industrial-scale transportation system among prisons. Detainees were tortured on each leg of their journeys. Some recalled riding for hours in trucks normally used for animal carcasses, chained to meat hooks. Ghabbash's new cell was typical: 3.6 metres long, 2.7 metres wide, usually packed so tightly that prisoners had to sleep in shifts. Outside the cell, a man was blindfolded and handcuffed in the corridor. It was Darwish, the human rights lawyer. He had been singled out for lecturing a judge on Syrian laws guaranteeing fair trials.

He later ticked off his punishment: "Naked, no water, no sleep, forced to drink my pee." Prison torture grew more brutal and baroque as rebels outside made advances and government warplanes bombed restive neighbourhoods. Survivors describe sadistic treatment, rape, summary executions or detainees left to die of untreated wounds and illnesses. After weeks or months, many prisoners got so-called trials lasting minutes with no defense lawyers. Ghabbash's was typical. At a military "field court" in 2012, he heard a judge rattle off his conviction, "terrorism that destroyed public property," and his sentence: death. "The whole trial was 1 1/2 minutes," he said. He expected to go to Saydnaya Prison, which by then was a mass execution centre. Thousands have been hanged there after summary trials, according to an Amnesty International report.

"Good, it's finished," he recalled thinking. But it was not. He would endure another year of daily beatings. His last stint was in a makeshift prison deep underground near Damascus, a military bunker of the elite 4th Division, a fief of Assad's brother Maher. There were no more interrogations. "Torture just for torture," said Darwish, who was also transferred there. "For revenge, for killing, for breaking the people." Rape and Assault Women and girls have been raped and sexually assaulted in at least 20 intelligence branches, and men and boys in 15 of those, a UN human rights commission reported last year.

Sexual assault is a double-barrelled weapon in traditional Muslim communities, where survivors are often stigmatised. Relatives have killed female ex-detainees in honour killings, sometimes merely on the assumption they have been raped, rights reports and survivors say. Mariam Khleif, a 32-year-old mother of five from Hama, was repeatedly raped during her detention. Khleif said she had aided injured protesters and delivered medical supplies to rebels, acts that the government labelled terrorism. Khleif's family rejected her over what they considered her loss of honour and her politics, she said. Her pro-government brother texted death threats; her husband divorced her. For some conservative men, the conflict changed attitudes. Several survivors and male relatives say their families now honour sexual assault survivors as war wounded. Khleif hid nothing from her new husband, a former rebel. "You are a medal on my chest, you are the crown on my head," she recalled him telling her.

Names Written in Blood Detainees and defectors have risked their lives to tell their families, and the world, of their plight. In the 4th Division dungeon, several detainees decided to smuggle out the names of every prisoner they could identify. "Even though we are three stories underground, still we can continue our work," recalled one, Mansour Omari, who said he was imprisoned for human rights work. Another detainee, Nabil Shurbaji — a journalist who, by coincidence, was the first to inspire Ghabbash to activism in 2011 and later shared his cell in Mezze — tried to write on cloth scraps with tomato paste. Too faint. Shurbaji finally used the detainees' own blood, from their malnourished gums, mixed with rust. A detained tailor sewed the scraps into Omari's shirt. He made it out.

The message in blood reached Western capitals; the shirt scraps were displayed at the Holocaust Museum in Washington. Two years later, a released detainee reported that Shurbaji had been beaten to death. 'Don't Forget Us' Syria's war remains without a political solution. With peace talks stalled, Russia is urging the West to normalise and finance reconstruction anyway, deferring reforms. The millions of relatives of missing detainees float in a social and psychological limbo. Without death certificates, presumed widows cannot remarry. Children cannot inherit. In Syria, Lebanon, Turkey, Jordan, Germany, France, Sweden and beyond, families and survivors push on. After he was freed in 2013, Ghabbash landed in Gaziantep, Turkey, where he runs women's rights and aid programs for refugees in the last patch of rebel-held Syria. Darwish struggles with insomnia and claustrophobia, but continues his work for accountability. He recently testified about Mezze prison in a French court hearing in the case of a Syrian-French father and son who died there. That helped French prosecutors secure arrest warrants for Mamlouk, the top security official, Hassan, the air force intelligence chief, and the head of Mezze prison. Now, Mamlouk could be arrested if he travels to Europe.

The threat of prosecution, Darwish said, is the only tool left to save detainees. "It gives you energy, but it's a heavy responsibility," he said. "This could save a soul. Some are my friends. When I was released they said, 'Please don't forget us.'" The New York Times