MOSCOW (AP) - Relatives wept and hugged as the nine people killed in a school shooting in the Russian city of Kazan were buried Wednesday, which was declared a day of mourning in the predominantly Muslim republic of Tatarstan.

A huge pile of flowers grew at a makeshift memorial outside School No. 175 in the city 430 miles (700 kilometers) east of Moscow where the gunman opened fire on Tuesday, sending students diving under their desks, running from the building or even jumping from windows on upper floors. He also detonated a homemade bomb.

In addition to the seven students and two employees who died, another 23 people remained hospitalized from the attack at the school, which enrolls children from the first to 11th grades.

At the funeral of Elvira Ignatyeva, a 26-year-old English teacher, relatives and friends hugged each other and cried as she was laid to rest.

“She loved children,” said her uncle, Talgat Gumerov, speaking to reporters in a quavering voice after the burial, which was carried out the day after her death in accordance to Islamic tradition.

Investigators gave no motive as to why Ilnaz Galyaviyev, 19, who was arrested in the shooting, carried out the attack at his former school. He appeared in court Wednesday, charged with murder, and was ordered to pre-trial detention for two months. Officials said he legally owned a firearm.

Russian President Vladimir Putin ordered the head of the country's National Guard to revise firearms regulations for civilians.

But independent media pointed out that hardly any measures tightening control over gun ownership have been implemented since Putin gave a similar order three years ago after 21 people died in a school shooting in the Russian-annexed Crimean Peninsula.

Kremlin spokesman Dmitry Peskov told reporters Wednesday that Putin's new task is a good reason to look into how old orders are being implemented.

Russian media said the gunman had called himself “a god” on the messaging app Telegram and promised to kill a “large amount” of people on Tuesday morning.

Rustam Khairullin, the imam of a mosque, had sons aged 9 and 14 at the school. The 9-year-old was hospitalized with wounds to his chest and arm from an explosive set off by the attacker.

The older son, Akhmad, who was in a classroom targeted by the attacker, was unhurt.

“We heard an explosion, ran to the window and saw two classes running,” the youth said. “In two or three minutes, the bandit came to our class. The teacher took the first blow and then he started shooting at children.”

Attacks on schools are rare in Russia. The deadliest school attack in Russia took place in 2004 in the city of Beslan, when Islamic militants took more than 1,000 people hostage for several days. The siege ended in gunfire and explosions, leaving 334 dead, more than half of them children.

In 2018, a teenager killed 20 people at his vocational school before killing himself in the Crimean city of Kerch. In the wake of that attack, Putin ordered authorities to tighten control over gun ownership.

Guns are tightly restricted in Russia. Civilians over 18 can obtain permits for hunting or sports firearms after medical checks ensuring they don't use drugs or psychoactive substances. It is illegal to own handguns, guns that shoot in bursts or that have magazines with more than a 10-cartridge capacity.

Most of the proposed measures to tighten gun control - such as raising the minimum age for gun possession, more frequent medical checks for obtaining or renewing a gun permit, and stricter punishments for gun violations - were never implemented.

In particular, a suggestion that people who have a license for firearms notify the authorities about their travel raised an outcry and was quietly scrapped, along with a proposal to raise the minimal age for gun ownership from 18 to 21.

Moreover, legislative changes have been in the works to ease some regulations. A bill lowering the minimum age for possessing hunting weapons from 18 to 16 successfully passed the first reading in the lower parliament chamber last year.

In the meantime, law enforcement regularly reported thwarting planned school attacks and detaining teenagers allegedly involved in plotting them. Security forces said some of them had weapons or homemade explosives, while others were members of social media communities dedicated to notorious school shootings in the U.S., such as the 1999 killings at Columbine High School in Littleton, Colorado.

On Wednesday, State Duma lawmakers supported a bill banning people with multiple criminal convictions and those caught for drunken driving from obtaining gun permits. It is unclear, however, how the measure would have prevented the Kazan shooting, since there was no indication the suspect had a criminal record.

Russian lawmaker Alexander Khinshtein said on Telegram on Tuesday that Galyaviyev received a permit for a shotgun less than two weeks ago. Authorities did not specify what kind of gun he used, but confirmed he bought it legally.

The statement said Galyaviyev had sought medical help for severe headaches but did not say what the diagnosis was, adding only that his family noted he had been exhibiting a “short temper” and “aggressiveness” since the start of the year.

According to media reports, Galyaviyev was expelled from his vocational school in April after not showing up for classes and exams for weeks.

Khinshtein said the school that was attacked had no security aside from a panic button. Officials in Kazan said a person had been stationed at the door during the day and that she had hit the panic button to alert law enforcement.

Calls to update security in schools came from a number of Russian regions, but it wasn't immediately clear whether any drastic changes have begun.

At the same time, some lawmakers are urging more restrictions on the internet, Russia's main outlet for dissent. State Duma speaker Vyacheslav Volodin said Tuesday that suggestions were aired to eliminate “anonymity in the internet, which would allow, supporters of the idea believe, to drastically decrease amounts of content promoting violence.”

But Telegram founder Pavel Durov said Galyaviyev made his account about the attack open to public only 15 minutes before it happened, and his posts were too vague to act on. “The inevitability of such events doesn't make them less tragic. But they should not serve as a pretext for organizing a witch hunt or turning the society into a concentration camp,” Durov wrote on his account.

Associated Press journalists Daniel Kozin in Kazan and Vladimir Isachenkov in Moscow contributed to this report.