PESHAWAR, PAKISTAN -- Officials vowed Saturday to hunt down and arrest the masterminds behind a deadly mosque attack in Pakistan a day earlier claimed by an Islamic State affiliate. The assault killed 63 people and wounded nearly 200.

ISIS said in a statement the lone suicide bomber was from neighboring Afghanistan. He shot two police guarding the Shiite Muslim mosque in northwest Peshawar before entering inside and exploding his device, it said. The attack took place as worshipers knelt in Friday prayer. The ISIS affiliate, known as ISIS in Khorasan Province, is headquartered in eastern Afghanistan.

The Taliban rulers in Afghanistan, who have been fighting ISIS, condemned the attack. ISIS has proven to be the Taliban's greatest security threat since sweeping into power last August.

"We condemn the bombing of a mosque in Peshawar, Pakistan. There is no justification for attacking civilians and worshipers," Taliban Deputy Minister for Culture and Information Zabihullah Mujahid tweeted. He refused to comment on the ISIS claim that the suicide bomber was Afghan.

The death toll was likely to continue to rise, said Asim Khan, spokesman for Peshawar's Lady Reading Hospital. At least four of 38 patients still hospitalized are in critical condition, he said.

Late into Friday night and early Saturday, Pakistanis buried their dead amid heavy security, with sniffer dogs deployed. Police carried out body searches of mourners who were then searched a second time by security provided by Pakistan's Shiite community.

Hundreds of mourners crying and beating their chests attended funeral prayers for 13 victims late Friday and for another 11 on Saturday at Peshawar's Kohati Gate. The coffins were covered with shrouds, some with Quranic sayings. They were lined up on open ground, made visible by bare light bulbs.

"These were human beings and worshipers inside the mosque, and they were brutally killed at a time when they were busy praying to God," Hayat Khan told The Associated Press late Friday night as he buried a relative.

One of the police officers who was shot outside Kucha Risaldar mosque died immediately and the second died later from his wounds, police officials said.

Pakistan Information Minister Fawad Chaudhry said in a statement that three investigation teams were established to study forensic evidence and closed-circuit TV footage to track down the attack's organizers.

In CCTV footage seen by The Associated Press, the lone attacker concealed his bomb beneath a large black shawl. The footage showed the bomber moving quickly up a narrow street toward the mosque entrance. He fired at the police protecting the mosque before entering inside.

Within seconds, there is a powerful explosion and the camera lens is obscured with dust and debris. The crudely made device was packed with ball bearings, a deadly method of constructing a bomb to inflict maximum carnage because it sprays deadly projectiles over a large area. The ball bearings caused the high death toll, said Moazzam Jah Ansari, the top police official for Khyber Pukhtunkhwa province, where Peshawar is the capital.

Immediately after the bombing, Pakistan's minority Shiites slammed the government for lax security arrangements demanding greater attention to their safety.

Friday's attack in Peshawar's congested old city was the worst in years in Pakistan. The country has seen renewed militant attacks after several years of relative quiet that followed military operations against militant hideouts in the border regions with Afghanistan.

The attacks have mostly been carried out by the Pakistani Taliban since last August when the Afghan Taliban swept into power and America ended its 20-year involvement in Afghanistan. The Pakistan Taliban are not connected to the new Afghan rulers. However, they are hiding out in Afghanistan and despite Pakistan's repeated request to hand them over, none have yet been found and expelled.

The Islamic State affiliate, often referred to as ISIS-K, is an enemy of the Afghan Taliban and has carried out successive operations against them since coming into power last year. Pakistani security officials have insisted ISIS has little presence in Pakistan, yet in their statement claiming responsibility for the mosque attack, IS vowed to carry out more attacks in both Pakistan and Afghanistan.

"Islamic State fighters are constantly targeting Shiites living in Pakistan and Afghanistan despite the intense security measures adopted by the Taliban militia and the Pakistani police to secure Shi'a temples and centers," said the ISIS statement carried on its Amaq News Agency site.

------

Associated Press writers Tameem Akhgar in Islamabad and Maamoun Youssef in Cairo contributed.