AN AFGHAN toddler shot five times by Taliban militants in an attack at a Kabul hotel that killed his journalist father and the rest of his family has regained consciousness and asked for his mother, relatives said Monday, calling the survival of the nearly 2-year-old boy a miracle.

Hundreds of colleagues, dignitaries and loved ones gathered, meanwhile, at a memorial service for Agence France-Presse reporter Sardar Ahmad, his wife and their two other children, slain in Friday’s rampage at a restaurant in the Serena hotel.

Nine people in all were shot at close range and killed in the attack, which was particularly shocking because the luxury hotel has long been considered one of the safest places in Kabul to stay. The dead included four foreigners and an Afghan businessman.

The Ahmad family’s youngest child, Abuzar, emerged from a coma on Sunday, and his condition was markedly improved, according to a cousin who provided pictures, including one showing a doctor leaning over the heavily bandaged child.

“Now he’s completely in recovery mode,’’ 25-year-old Turaj Rais said in a telephone interview. “Abuzar gives me hope. We are looking forward to a bright future for him.’’

Mr Rais, who was Sardar Ahmad’s nephew and lived with the family before he got married, said Abuzar had even reached out to grab his iPhone to play a video game, though he was unable to do so. He said a family meeting was planned to decide who would take guardianship of the boy.

Ahmad and his wife, Humaira, had taken their three children - Nilofar, 6, Omar, 4, and Abuzar - to the Serena for a buffet dinner to celebrate the Persian new year. The hotel is popular with foreigners and well-to-do Afghans looking for respite from the broken streets and chaos outside.

Authorities said the four gunmen, dressed in traditional Afghan tunics and loose trousers, were armed with small pistols that fit in the palms of their hands. Security forces killed them after a three-hour standoff.

The Interior Ministry said the attackers hid the pistols and ammunition in the soles of their shoes, and security-video footage shows they were searched twice before walking through the lobby and entering the restaurant. Investigators have yet to explain how they got past the searches and a metal detector.

The Taliban claimed responsibility for the attack through spokesman Zabihullah Mujahid, who said it showed the Islamic militant movement can strike anywhere. But he denied the militants killed Ahmad and the children, blaming Afghan security forces and their Western allies.

Investigators said the gunmen may have had inside help. The Afghan intelligence service said in a statement that one hotel worker who “was well aware of the security measures of this hotel’’ had quit his job and left the country a week before the attack.

The National Directorate of Security also reiterated the government’s assertion that a foreign spy agency was behind the attack. It did not specify the country, but Afghanistan routinely accuses Pakistan of sending militants across the border.

The intelligence agency said that the attack involved “sophisticated tactics ... of a totally new nature in Afghanistan,’’ and that a number of hotel employees, including the one who quit, had contacts with regional intelligence agencies.

Pakistan condemned the attack and denied any involvement, saying a Pakistani had been seriously hurt.

“It is highly disturbing that attempts are being made to somehow implicate Pakistan in this terrorist incident,’’ the Foreign Ministry said in a statement. “We reject the insinuation.’’