QUETTA, Pakistan (Reuters) - A suicide bomber in Pakistan killed at least 70 people and wounded more than 100 on Monday in an attack on mourners gathered at a hospital in the southwestern city of Quetta, and Islamic State and a Taliban faction claimed responsibility.

The bomber struck as a crowd of mostly lawyers and journalists crammed into the emergency department to accompany the body of a prominent lawyer who had been shot and killed in the city earlier in the day, Faridullah, a reporter who was among the wounded, told Reuters.

Abdul Rehman Miankhel, a senior official at the government-run Civil Hospital, where the explosion occurred, told reporters that at least 70 people had been killed, with more than 112 wounded.

“There are many wounded, so the death toll could rise,” said Rehmat Saleh Baloch, the provincial health minister.

Islamic State’s Amaq news agency reported the Middle East-based movement was behind the atrocity. If true, it would mark an alarming development for Pakistan, long plagued by Islamist militant violence but most of it locally-based.

“A martyr from the Islamic State detonated his explosive belt at a gathering of justice ministry employees and Pakistani policemen in the city of Quetta,” Amaq said.

Jamaat-ur-Ahrar, a faction of the Islamist militant Pakistani Taliban group, earlier said it had carried out the attack. The movement at one time swore fealty to Islamic State’s Middle East leadership, but later switched back to the Taliban.

“The Tehreek-e-Taliban Pakistan Jamaat-ur-Ahrar (TTP-JA) takes responsibility for this attack, and pledges to continue carrying out such attacks,” said spokesman Ehsanullah Ehsan in a statement.

Only last week, Jamaat was added to the United States’ list of global terrorists, triggering sanctions.

First responders and volunteers transport an injured man away from the scene of a bomb blast outside a hospital in Quetta, Pakistan August 8, 2016. REUTERS/Naseer Ahmed

It remains unclear what ties Jamaat retains to Islamic State, whose leadership is a rival to both the Taliban and al Qaeda over claims to represent the true Islamist Caliphate.

In September 2014, Jamaat-ur-Ahrar rejected the Pakistani Taliban during a leadership struggle and swore allegiance to Islamic State, also known as Daesh.

By March 2015, however, the group was again swearing loyalty to the main Pakistani Taliban umbrella leadership. The reason for its return to the fold remains murky, but Jamaat also never specifically disavowed Islamic State either.

U.S. CONDEMNATION

The White House condemned the attack. “We remain resolute in joining with the people of Pakistan in confronting terrorism in Pakistan and across the region,” it said in a statement.

Television footage showed scenes of chaos at the hospital in Quetta, with panicked people fleeing through debris as smoke filled the corridors.

Bodies lay strewn across a hospital courtyard shortly after the blast and pools of blood collected as emergency rescuers rushed to identify survivors.

The motive behind the attack was unclear, but several lawyers have been targeted during a recent spate of killings in Quetta, the provincial capital of Baluchistan, which has a history of militant and separatist violence.

The latest victim, Bilal Anwar Kasi, was shot and killed while on his way to the city’s main court complex, senior police official Nadeem Shah told Reuters. He was the president of Baluchistan Bar Association.

The subsequent suicide attack appeared to target his mourners, said Anwar ul Haq Kakar, a spokesman for the Baluchistan government.

“It seems it was a pre-planned attack,” he said.

Ali Zafar, president of the Supreme Court Bar Association of Pakistan, told reporters in the eastern city of Lahore, “We (lawyers) have been targeted because we always raise our voice for people’s rights and for democracy ... Lawyers will not just protest this attack but also prepare a long-term plan of action.”

Police cordoned off the hospital following the blast, with Prime Minister Nawaz Sharif and Army Chief General Raheel Sharif paying visits to the wounded on Monday evening.

In January, a suicide bomber killed 15 people outside a polio eradication center in an attack claimed by both the Pakistani Taliban and Jundullah, an Islamist militant group that has pledged allegiance to Islamic State in the Middle East.

Monday’s attack was the deadliest in Pakistan since an Easter Day bombing ripped through a Lahore park, killing at least 72 people. Jamaat-ur-Ahrar also claimed responsibility for the bombing.

Quetta has long been regarded as a base for the Afghan Taliban, whose leadership has regularly held meetings there in the past.

In May, Afghan Taliban leader Mullah Akhtar Mansour was killed by a U.S. drone strike while travelling to Quetta from the Pakistan-Iran border.