Mr. Vaz said emergency workers and technicians had to first figure out whether the sirens had been activated because of an actual emergency. And turning off the sirens also proved difficult, eventually prompting officials to shut down the entire system.

“Every time we thought we had turned it off, the sirens would sound again, because whoever was hacking us was continuously hacking us,” Ms. Syed said.

The system was still down on Saturday afternoon, and officials said they hoped to have it functional again by the end of the weekend. They said they had pinpointed the origin of the security breach after ruling out that the alarms had come from their control system or from remote access.

“Talking to all the experts in the siren industry, in the field,” Mr. Vaz said. “This is a very rare event.”

Mr. Vaz said that Dallas had reached out to the Federal Communications Commission for help and was taking steps to prevent hackers from setting off the entire system again, but that city officials had not communicated with federal law enforcement authorities.

The city has had other recent struggles with its emergency systems. Its 911 system has had a problem with one phone carrier that has caused wait times as long as 26 minutes, The Dallas Morning News reported.

At least 4,400 calls came into the area’s 911 system locally in the hours around the attack on Friday night, Ms. Syed said — about double the amount normal overnight. The longest wait time was about six minutes, she said.

Security officials have warned for years about the risks that hacking attacks can pose to infrastructure. The number of attacks on critical infrastructure appears to have risen: to nearly 300 in 2015 from just under 200 in 2012, according to federal data. In 2013, hackers tied to the Iranian military tried to gain control of a small dam in upstate New York.