ISTANBUL >> A week after a devastating earthquake struck Turkey and Syria, with families crowded under tarps and cardboard shelters, a severe shortage of tents, housing and medical supplies is imperiling relief efforts, leaving survivors struggling amid ruins and in extreme cold.

The death toll for both countries surpassed 35,000 on Monday, and more than 1 million people were left homeless in Turkey alone, according to the Turkish government. One of the most urgent needs was shelter to help the thousands of people whose homes were either destroyed or may be unsafe.

In the towns and cities in the earthquake zone, people appeared to be crowded everywhere except inside the cracked and unstable buildings where they had once worked and lived. Large apartment towers stood dark and empty, while tents and makeshift shelters filled parks, sidewalks and the courtyards of mosques.

Syria opens crossings

Conditions were dire enough that Bashar Assad, Syria’s authoritarian president, decided to open two aid crossings from Turkey into northwest Syria, where both his government and opposition forces control territory, the United Nations announced Monday.

The decision, which would allow aid to flow across the border for three months, was the first time that Assad had agreed to open the crossings to humanitarian aid since Syria’s civil war began in 2011. The Syrian government has tightly controlled what aid is allowed into opposition-held areas, and Bab al-Hawa, the only U.N.-approved border crossing between Turkey and Syria for transporting international aid, had been a lifeline for such areas in the north.

The lack of food, clothing, medicine, shelter and warmth was acute all over the region. At a campsite across the street from a collapsed building in Kahramanmaras, a Turkish city near the epicenter, one family struggled to stay warm around a fire of whatever it could burn.

“I couldn’t think about eating,” said Zeynep Omac, sitting on wooden benches with her two children, 9 and 14, near a plume of acrid smoke. “I just give the kids snacks I can find.”

Tents in short supply

Turkey’s national emergency management agency, AFAD, has distributed a huge quantity of tents — with the help of more than 238,000 relief workers — but the sheer scale of the disaster has meant many still lack shelter.

Many people cobbled debris together to erect what they could: One family of about a dozen people built a shelter of cardboard and tarp over a flatbed truck, with blankets and thin mattresses in the bed.

The Turkish Red Crescent, a humanitarian group, said it was speeding up the production of tents after the Turkish news media reported a shortage of temporary housing and poor sanitary conditions for the homeless.

Rescue chances dim

Although the authorities occasionally reported a harrowing rescue, fewer and fewer survivors were found Monday. Rescuers using sniffer dogs and thermal cameras surveyed pulverized apartment blocks for any sign of life a week after the disaster.

Teams in southern Turkey’s Hatay province cheered and clapped when a 13-year-old boy identified only by his first name, Kaan, was pulled from the rubble. In Gaziantep province, rescue workers, including coal miners who secured tunnels with wooden supports, found a woman alive in the wreckage of a five-story building.

Stories of such rescues have flooded the airwaves, but tens of thousands of dead have been found during the same period, and experts say the window for rescues has nearly closed, given the length of time that has passed, the fact that temperatures have fallen to minus 21 degrees Fahrenheit and the severity of the building collapses.

In some areas, searchers placed signs that read “ses yok,” or “no sound,” in front of buildings they had inspected for any sign that someone was alive inside, HaberTurk television reported.

Martin Griffiths, the top humanitarian chief at the U.N., said Monday that the focus was moving to providing shelter, food, schooling and psychological care to victims.

Turkey places blame

As President Recep Tayyip Erdogan of Turkey came under criticism for his government’s response to the disaster, Turkish officials Monday detained more property developers and others suspected of having a hand in construction that violated building codes, according to the state-run Anadolu News Agency. Experts have said that poor construction most likely worsened the toll.

One of the latest people to be detained was Ibrahim Mustafa Uncuoglu, a contractor of a collapsed building in the southern city of Gaziantep, Anadolu reported. Bekir Bozdag, Turkey’s justice minister, said Sunday that legal proceedings against more than 130 people were underway over their apparent ties to collapsed buildings.

Separately, Turkish police said in a statement Monday that authorities had detained 56 people and arrested 14 of them, without specifying charges, on accusations that they had spread disinformation about the earthquake.

The earthquake, which had a 7.8 magnitude and was followed by an aftershock nearly as strong, is already Turkey’s deadliest since 1939. The death toll there is now more than 31,600; in northwestern Syria, more than 3,500 people have died.

This report includes information from The Associated Press.