Muslim leaders pledged to work more closely at a rare summit in Pakistan on Thursday as militant attacks killed 37 people across the country in some of the deadliest violence claimed by the Taliban for months. The string of attacks on Shiite Muslims and police and troops underscored the security challenge in a country where Taliban and Al-Qaeda-linked extremists bitterly oppose the US-allied government. Twenty-three people were killed and 62 wounded overnight in Rawalpindi, the twin city of summit venue Islamabad, where Iranian President Mahmoud Ahmadinejad and Turkish Prime Minister Recep Tayyip Erdogan were among the summit guests. Police said a suicide bomber struck a procession of Shiites who were commemorating the holy month of Muharram, which is frequently targeted by sectarian extremists in Pakistan. It was the deadliest bombing in Pakistan since 29 people were killed in the northwestern district of Khyber on June 16 and the worst attack on Shiites since February 17, when a suicide bomber killed 31 people in northwestern Kurram. The Pakistani Taliban claimed responsibility for the attack. It also claimed an explosion Wednesday that killed two people near a Shiite mosque in Karachi, and attacks targeting security forces in the northwest which officials said left five police dead. Pakistani President Asif Ali Zardari conceded the gravity of the threat. \"Al-Qaeda and its affiliates like TTP (Tehreek-e-Taliban Pakistan) pose a serious threat to aspirations of our future,\" he told the summit. \"We continue and will not allow Islam to be hijacked. We are fighting terrorists and their destructive vision every day,\" he said. Also on Thursday, militants attacked police in the northwestern city of Peshawar, killing two officers and abducting another from two different checkpoints. Pakistani Taliban spokesman Ehsanullah Ehsan, referring to the bombing in Rawalpindi, told AFP that Shiites were \"defiling the Prophet\". The Taliban has been fighting an insurgency against security forces since 2007, one of the chief reasons why Pakistan so rarely hosts international events. \"It seems the new breed of religious zealots wanted to tell the D8 dignitaries all about the mess the Islamic Republic of Pakistan has been turned into,\" said the country\'s independent human rights commission in a statement. Pakistan had hoped that Thursday\'s Developing Eight summit would present a different image of the country as it took chairmanship of the group that also includes Bangladesh, Egypt, Indonesia, Iran, Nigeria, Malaysia and Turkey. At the end of the summit, delegates signed a D8 charter and Pakistan\'s top foreign ministry official Jalil Abbas Jilani praised what he called a \"wonderful conference\" -- Pakistan\'s first major international summit in eight years. He said development and trade bank initiatives were discussed along with efforts to encourage barter trade and possible currency swap agreements. Iranian President Mahmoud Ahmadinejad vowed to complete a multi-billion dollar gas pipeline to Pakistan on time in 2014, downplaying financial woes and US pressure on Islamabad to scrap the project. Security was tight in Islamabad with thousands of extra police and paramilitaries deployed and schools closed. Thursday was declared a partial public holiday and motorcycles were banned close to government installations. India on Thursday also asked Pakistan to increase security at its embassy in Islamabad, fearing possible demonstrations or reprisals over its execution of Pakistani militant Mohammed Kasab for his role in the 2008 Mumbai attacks. The Pakistani Taliban has threatened to avenge the execution and demands that Kasab\'s body be repatriated, the spokesman told AFP by telephone. Aside from the unrest in Pakistan, eight days of violence between Israel and the Palestinian movement Hamas loomed large over the D8 proceedings. Egyptian President Mohamed Morsi -- who was thanked by the United States for helping to broker a ceasefire between Israel and Hamas -- bowed out of the talks as his office said he would now stay at home to monitor a truce. The ceasefire was agreed in a deal between Israel and Palestinian group Hamas after at least 160 people were killed. Ahmadinejad, whose country was credited by Hamas for arming it, gave the ceasefire a qualified welcome, adding however \"we will have to see the basis of this truce\". He lashed out against Israel saying there was \"no reason whatsoever for any military attacks\" but made no mention of Hamas rocket attacks on the Jewish state, Iran\'s arch enemy. Meanwhile Morsi\'s deputy, Mahmoud Mekki, urged the west African regional bloc to find a peaceful resolution to the crisis in Mali where Islamic extremists have taken control of the north of the country. The D8 was formed in 1997 to advance development cooperation among the member nations. They are mainly Muslim states with the exception of Nigeria, which is roughly divided between Muslims and Christians.