Karachi: At least 45 people have been killed and 20 others injured after a passenger bus carrying members of the minority Ismaili Shia community was attacked by gunmen on motorcycles in Pakistan's Karachi on Wednesday.

Some leaflets found at the site of the attack claimed it had been perpetrated by the Daulatul Islamiyyah Baaqiya, an Islamic State-inspired group, reported AFP.

The statement claims the attack was in retaliation to the killing of Lal Masjid students, deaths of terrorists in “staged” encounters by Karachi police, the 2013 killing of Sunni Muslims in Rawalpindi’s sectarian riots of Raja Market, and the “atrocities” committed by “Rawafidh” in Iraq and Yemen.

Also, terror-tracking website Site Intel Group tweeted that Khorasan Province, a division of the Islamic State (IS) in the Afghan-Pakistan region, claimed credit for the deadly attack.

Khorasan Province of #ISIS claimed credit for the deadly attack on a bus transporting Ismailis in Karachi. — SITE Intel Group (@siteintelgroup) May 13, 2015

The militants have also vowed to continue their attacks until Shariah law is implemented in Pakistan and they have “rid this land of” Shia Muslims.

Media reports initially said that militant group Pakistan Tehrik-e-Taliban has claimed responsibility for the attack.

The hospital confirmed that at least 25 men and 16 women have been killed in the incident, according to a Dawn.com news report.

Pakistan police and rangers arrived at the scene of the terror attack shortly after the incident and cordoned off the area.

A search operation is underway for the gunmen who managed to escape after the incident.

Eyewitnesses recall terror attack

According to eye-witnesses, eight motorcycle-borne gunmen donning police uniforms stopped the bus, entered it and and shot the passengers in the head.

The bus was carrying over 60 passengers of the minority community near Safoora Chowk in Karachi.

The passengers, including men, women and children, were travelling to their place of worship near Aysha Manzil, police said.

The gunmen had reportedly used 9 mm pistol to attack the bus, which belonged to Al-Azhar Garden Colony, an Ismaili community housing project in Karachi.

PM Nawaz Sharif seeks report

Pakistan Prime Minister Nawaz Sharif and President Mamnoon Hussain has condemned the attack. Sharif has sought a report from the Interior Ministry on the incident.

The attack came a day after Sharif's Kabul visit where he said that enemies of Afghanistan are also enemies of Pakistan.

"It was a targeted attack," Sindh Police Inspector General Ghulam Haider Jamali told reporters.

General Raheel Sharif leaves for Karachi

Chief of Army Staff (COAS) General Raheel Sharif cancelled his visit to Sri Lanka to rush to Karachi after the attack.

#COAS cancels his pre scheduled 3 days visit to Sri Lanka due to Kci terrorist Bus attack — AsimBajwaISPR (@AsimBajwaISPR) May 13, 2015

Politicians condemn attack

Meanwhile, Prime Minister Narendra Modi took to Twitter to condemn the incident and tweeted. “We stand firmly with the people of Pakistan in this hour of grief. I wish all those injured a quick recovery.”

PM Sushil Koirala & I had a telephonic conversation. We reviewed the situation arising due to yesterday's tremors. — Narendra Modi (@narendramodi) May 13, 2015

I assured PM Koirala of all possible co-operation from our side in the wake of the earthquake. — Narendra Modi (@narendramodi) May 13, 2015

Tehreek-e-Insaf chief Imran Khan took to Twitter to condemn the attack and tweeted, “Stunned & grieved at most condemnable terror attack in Karachi on ordinary citizens of Pak belonging to a most peaceful community.”

Stunned & grieved at most condemnable terror attack in Karachi on ordinary citizens of Pak belonging to a most peaceful community. — Imran Khan (@ImranKhanPTI) May 13, 2015

Sindh Chief Minister Syed Qaim Ali Shah termed it a "terrorist attack" and said the culprits will be arrested and justice will be done. He announced Rs 500,000 compensation for the dead and free treatment for the injured.