STR, Associated Press
Emergency workers collect bodies outside school in Beslan, North Ossetia. The death toll has reached 340.

BESLAN, Russia — Attackers who seized more than 1,000 hostages in a provincial middle school might have smuggled in a large cache of weapons, possibly disguised as construction equipment, in the weeks before the siege, Russian officials said Saturday as the death toll rose to 340, nearly half of them children.

Russian President Vladimir V. Putin, in a nationally televised address, called the hostage standoff that ended in a nightmare of explosions and gunfire Friday "an act unprecedented in its inhumanness and cruelty" and "an attack against our country."

In an extraordinary admission of responsibility, Putin said that inadequate spending for defense since the collapse of the Soviet Union and corruption in the judicial system have left the nation vulnerable.

"We could have been more effective if we had acted professionally and at the right moment . . . (but) we proved unable to react adequately," Putin said in the speech, the first to address a spate of attacks that have killed 440 Russians in the past two weeks alone. "We showed ourselves to be weak, and the weak get beaten."

Earlier in the day, Putin flew briefly to this shattered town in southern Russia, visiting a hospital where the wounded were being treated.

On Saturday, authorities laid out the bodies of all 26 hostage-takers in the schoolyard here. Authorities believe they are linked to rebels from Chechnya, the nearby republic that has been engaged in a separatist war with Russian forces for most of the past 10 years, or neighboring Ingushetia, where rebel violence also has broken out. Russian officials said 10 of the fighters were Arabs but provided no proof.

Chechen rebel leader Aslan Maskhadov, elected Chechnya's president during its brief period of autonomy in the mid-1990s, strongly condemned the hostage seizure Saturday. Russians publicly have linked the school seizure to notorious Chechen warlord Shamil Basayev, an Islamic radical who is believed to have masterminded a series of suicide bombings against Russia over the past several years.

As authorities struggled to understand how the 26 hostage-takers could have mounted a furious gun battle with elite Russian "spetznaz" commandos that lasted nearly 10 hours, a Federal Security Service official said investigators believe the attackers might have sneaked in weaponry before the siege.

"Part of the weapons and ammunition were brought in and hidden in advance on the territory of the school where the terrorist act took place — we are carefully looking at this possibility," said Sergei Andreyev, head of the bureau's office in the republic of North Ossetia, where the attack occurred.

The question of how the attackers managed to bring in so much firepower has troubled investigators from the beginning. With several former hostages now reporting that they were forced to dig up the floor at the school to unveil a cache of weapons underneath, suspicion turned to remodeling at the school over the summer.

A worker who entered the building after the siege also reported that he saw false-fronted walls, once covered in temporary stucco, that were gouged out during the standoff to serve as sheltered firing positions.

Deputy prosecutor Sergei Fridinsky said Saturday that authorities have not linked the hostage seizure and the reconstruction contract "in any way."

But Lev Dzudayev, an aide to the North Ossetian president, said investigators believe the hostage-takers would not have been able to quickly carry in the amount of weaponry and ammunition deployed in Friday's firefight.

In response to reports that a Chechen construction company might have had a contract for remodeling the school building over the summer, Dzudayev said investigators "are looking into the period of time when the school building was being repaired."

In his speech, Putin said the collapse of communism had left Russia with weak defenses that could be blamed on inadequate funding for defense and border protection.

"In general, we need to admit that we did not fully understand the complexity and the dangers of the processes at work in our own country and in the world."

The president's admission was followed by a pledge to get tough on terrorism by stepping up law enforcement efforts and mobilizing civil society to resist terrorism and ethnic conflict.

Analysts predicted that Putin would respond with further clampdowns and broader leeway for law enforcement.

Contributing: David Holley in Moscow