ISTANBUL — Two dozen student volleyball players, four teachers and 12 parents visiting Turkey for a competition this month checked into the Grand Isias Hotel in the southern city of Adiyaman. When a powerful earthquake struck on Feb. 6, the building collapsed and killed dozens of people including everyone in the entourage except for four adults.

A university engineer who examined the wreckage found indications of weak concrete and insufficient steel reinforcements, he and his colleagues wrote in a preliminary report, concluding that shoddy construction had left the building vulnerable, even to smaller quakes.

In the weeks since, the Turkish authorities have arrested three men connected to the hotel on unspecified charges as part of a wide-ranging dragnet targeting hundreds of building contractors and owners among others suspected of criminal negligence that contributed to deadly building collapses.

The suspects — some nabbed at the airport with stacks of cash or perp-walked on national television — have become the focus of public rage, with many now questioning whether they padded their profits by flouting the codes put in place over the last two decades to make buildings more quake resistant.

Construction industry experts say that contractors responsible for flawed buildings should be punished. But they also caution that targeting only them obscures gross negligence throughout the system meant to make buildings safe, which may have contributed to thousands of deaths. During most of the past decade, contractors could freely choose which private companies to hire to inspect their buildings, an arrangement that the government eventually concluded had led to “illegal commercial ties.”

“Putting the blame only on the contractors would be the easy way out,” said Ali Ozgunduz, a former state prosecutor who investigated collapsed buildings after another catastrophic earthquake in Turkey in 1999.

So far, the government has investigated 564 people suspected of connections to flawed or collapsed buildings, the state-run Anadolu news agency reported on Wednesday. Of those, 160 have been detained pending trial; 175 are on probation; and arrest warrants have been issued for dozens more. Many of them are contractors and builders.

The government has released few specifics about who is being investigated and why, but flaws in some buildings that fell were well documented before the quake. In some cases, buildings so new that they should have followed updated seismic standards toppled over. In others, contractors paid fines for violating building codes, but no steps were taken to evacuate or strengthen the vulnerable structures, according to lawyers involved in the cases.

Cemal Gokce, a former president of Turkey’s Chamber of Civil Engineers, a professional organization, accused President Recep Tayyip Erdogan’s government and his ruling Justice and Development Party of fostering a lax regulatory environment that left cities more vulnerable to earthquake damage.

“The government is trying to avoid responsibility by dumping it onto engineers and architects,” he said. “But the main culprit is the government because they put profits over the public interest.”

During visits to the disaster zone over the past few weeks, Mr. Erdogan seemed to suggest that Turkey should improve its earthquake preparedness.

All Turks “have lessons to learn from the disaster we lived through,” he said on Tuesday. “It is highly important that we eliminate our shortcomings and fortify our strengths in light of past experiences.”

The 7.8-magnitude quake on Feb. 6 and a 7.5-magnitude aftershock hours later damaged more than 100,000 buildings and killed more than 43,000 people in southern Turkey.

A seismically active country with a history of quakes, Turkey has upgraded its building codes since a powerful tremor near Istanbul in 1999 killed more than 17,000 people. But according to a 2021 parliamentary report, more than 7.8 million buildings constructed before the year 2000 are highly vulnerable to earthquakes.

For newer buildings, construction professionals say the strengthened building codes are technically good. But builders sometimes fail to adhere to those codes.

Mr. Ozgunduz, the former state prosecutor, pointed out weak links at various levels: local officials who greenlit poorly designed projects; inspectors who overlooked flaws during construction; and the Parliament’s passing of a blanket amnesty in 2018 for building code violations in millions of units.

“The political authority is liable too,” he said.

Hoping to broaden the scope of accountability, professional associations are preparing lawsuits against government officials they accuse of complicity.

“We will make sure it is not only the contractors who are held accountable, but also the municipalities, the ministry, the ruling party and all other authorities who are responsible for so many lost lives,” said Eren Can, a lawyer with the Istanbul Bar Association whose parents were killed when their apartment collapsed in the quake.

“I promise my mother and father that we will never let them get away with this.”

Mr. Gokce said problems with the inspection regime let bad practices slip through. So far, at least two building inspectors are among the suspects under scrutiny, suggesting that the government could broaden its inquiry.

Many inspectors lack experience. And from 2011 to 2019, when contractors were allowed to select and pay the private companies that inspected their buildings, it encouraged builders to hire low-cost inspectors who would “give them the least amount of trouble,” Mr. Gokce said.

Some contractors even went as far as setting up their own inspection companies, which they would then pay to effectively inspect themselves.

The government changed the system in 2019 and began assigning inspectors, eliminating what it called “the system’s biggest problem.”

For some buildings that collapsed, signs of trouble were clear before the quake.

In the southern city of Antakya, one of the areas hardest hit by the earthquake, Ebru Ulas and her husband, Gorkem, both lawyers, had filed 51 court cases over the last few years alleging code violations against a single contractor, Omer Cihan, Ms. Ulas said in an interview.

The complaints covered at least seven buildings and experts found problems with at least three of the structures, according to court documents. One of them was the Kule Apartments, a residential tower.

Ms. Ulas said that last year, a judge convicted Mr. Cihan on charges of violating construction regulations there, first sentencing him to a year in prison, then reducing his punishment to a fine of about $650.

On Feb. 6, the building came crashing down, and it is not yet clear how many people died there.

“I had fought as much as I could,” Ms. Ulas said of her legal efforts.

The authorities arrested Mr. Cihan last week. He testified that he had done all the necessary inspections and didn’t know why the building collapsed.

Some people arrested since the quake had connections to political parties, both government and opposition, although it was not immediately clear what role, if any, that may have played in their business practices.

The men arrested in connection to the Isias Hotel, where the volleyballers from Turkish-occupied northern Cyprus died, had ties on both sides of Turkey’s political divide — the government and the opposition.

One of them, Mehmet Fatih Bozkurt, had served as an Adiyaman City Council member in 2014 for Mr. Erdogan’s ruling party, but resigned from the party when his father, Ahmet Bozkurt, ran for Parliament for the largest opposition party the following year, according to Turkish news media.

The elder Mr. Bozkurt told the authorities that he had built the hotel in 1995 and could not remember who had inspected it, according to his testimony reported by Sabah, a pro-government newspaper. He denied accusations that he later modified the building in ways that would have weakened it.

Sahin Avsaroglu, the builder of a large and newly constructed residential project called Badi Saba, which collapsed in the city of Kahramanmaras near the quake’s epicenter, served as a district head for Mr. Erdogan’s party.

He filled his Instagram account with photos of himself with top officials, including Mr. Erdogan’s son-in-law, who was a former finance minister; Mr. Erdogan’s chief spokesman; and other former ministers from the party.

The authorities have since arrested Mr. Avsaroglu, and Turkish news media reported that the party removed him from his position. Representatives of Mr. Avsaroglu could not immediately be reached for comment.

Other projects were so new that they should have followed the more recent buildings codes, last updated in 2018.

Tezcan Karakuş Candan, chairwoman of the Ankara branch of Turkey’s Chamber of Architects, said the onus was on the government to ensure that regulations were followed.

“This is a major earthquake for sure, but this is not the first earthquake in Turkey,” she said. “The legislation does not mean anything on its own: There must be a public authority to inspect it,” she added.

“The system is broken.”

Gulsin Harman contributed reporting.