MOSCOW -- Nearly 8,000 people in Kazakhstan were detained by police during protests that descended into violence last week and marked the worst unrest the former Soviet nation has faced since gaining independence 30 years ago, authorities said Monday.

President Kassym-Jomart Tokayev on Monday described the unrest that followed initially peaceful protests against rising energy prices as a "terrorist aggression" against the mineral-rich Central Asian nation of 19 million and dismissed reports that authorities targeted peaceful demonstrators as "disinformation."

Kazakhstan's Interior Ministry reported that 7,939 people have been detained across the country. The National Security Committee, Kazakhstan's counterintelligence and anti-terrorism agency, said Monday the situation has "stabilized and is under control."

Monday was declared a day of mourning for the victims of the violent unrest, which the health ministry says killed 164 people, including three children.

The demonstrations began on Jan. 2 over a near-doubling of prices for vehicle fuel and quickly spread across the country, with political slogans reflecting wider discontent with Kazakhstan's authoritarian government.

In a concession, the government announced a 180-day price cap on vehicle fuel and a moratorium on utility rate increases. As the unrest mounted, the ministerial cabinet resigned and the president replaced Nursultan Nazarbayev, former longtime leader of Kazakhstan, as head of the National Security Council.

One of the main slogans of the past week's protests, "Old man out," was a reference to Nazarbayev, who served as president from Kazakhstan's independence until he resigned in 2019 and anointed Tokayev as his successor. Nazarbayev had retained substantial power at the helm of the National Security Council.

Despite the concessions, the protests turned extremely violent for several days. In Almaty, Kazakhstan's largest city, the protesters set the city hall on fire and stormed and briefly seized the airport. For several days, sporadic gunfire was reported in the city streets.

The authorities declared a state of emergency over the unrest, and Tokayev requested help from the Collective Security Treaty Organization, a Russia-led military alliance of six former Soviet states. The group has authorized sending about 2,500 mostly Russian troops to Kazakhstan as peacekeepers.

Tokayev has said the demonstrations were instigated by "terrorists" with foreign backing, although the protests have shown no obvious leaders or organization. On Friday, he said he ordered police and the military to shoot to kill "terrorists" involved in the violence.

In a statement Monday, Kazakhstan's Foreign Ministry said the peaceful protests "were hijacked by terrorist, extremist and criminal groups," including radical Islamist fighters with combat experience.

Speaking Monday at an extraordinary virtual summit of CSTO, Tokayev promised to reveal to the world "additional evidence" of a "terrorist aggression" against Kazakhstan. He stressed that the demands of peaceful protesters have been "heard and met by the state," and the unrest that followed involved "groups of armed militants" whose goal was to overthrow the government.

Russian President Vladimir Putin echoed that sentiment, calling the unrest "an act of aggression" masterminded from abroad.

"The events in Kazakhstan are not the first and not the last attempt at interfering in the internal affairs of our states from the outside," Putin said at the summit.

The Kazakh president added that "constitutional order" has been restored and the "large-scale anti-terrorist operation" in the country will soon wrap up, along with the CSTO mission.

The foreign militants involved, Tokayev charged later Monday, came from "mostly Central Asian countries, including Afghanistan," and some from Mideast nations.

Kazakhstan's National Security Committee said Monday that "hot spots of terrorist threats" in the country have been "neutralized." The committee also told Russia's Interfax news agency that authorities released well-known Kyrgyz musician Vikram Ruzakhunov, whose arrest over his alleged participation in the unrest sparked outrage in neighboring Kyrgyzstan.

Ruzakhunov was shown in a video on Kazakh television saying he had flown to the country to take part in protests and was promised US$200. In the video, apparently taken in police custody, Ruzakhunov's face was bruised and he had a large cut on his forehead.

Kyrygzstan's Foreign Ministry had demanded Ruzakhunov's release, and the country's authorities on Monday sought to open a probe on charges of torture.

On Monday evening, Ruzakhunov returned to Kyrgyzstan. He told a local TV channel that he came to Almaty on Jan. 2 to visit a friend, but several days later, as the protests turned violent, decided to travel back to Kyrgyzstan and was detained.

In jail, Ruzakhnunov heard from cellmates that confessing to going to Almaty with the purpose of taking part in the protests and being offered money for it was the quickest way to get deported home, so that's what he decided to do.

"It was a path (home), so I decided to implicate myself, even though I didn't do it," Ruzakhunov said.