JALALABAD, Afghanistan — A suicide bomber struck a crowd of Afghan Sikhs and Hindus arriving to meet with President Ashraf Ghani on Sunday as he visited the eastern city of Jalalabad, an attack that killed at least 19 people and wounded 10 others, officials said.
The attack claimed the life of the only Sikh candidate running in elections in the country this year, a further blow to Afghanistan’s once celebrated diversity, which has been badly affected by decades of violence.
The suicide bombing was the second deadly attack in 24 hours in the province surrounding Jalalabad, known as Nangarhar, where the Islamic State has a foothold and has repeatedly claimed responsibility for urban suicide bombings. Late on Saturday, militants targeted a boys’ school in Khogyani district, beheading three workers and setting fire to the school building.
Nangarhar lies along the Afghan border with Pakistan, and Islamic State fighters here have continued to pose a threat despite sustained operations from Afghan commandos and American airstrikes. American and Afghan officials have said the militants’ territory has shrunk to just a few districts in the country, but the group continues to declare threats and carry out suicide bombings.
Even as the Afghan government and the United States have pushed for peace talks to end the 17-year war with the Taliban, officials remain on alert that the small Islamic State affiliate could play spoiler.
As the Afghan government and the Taliban declared cease-fires last month, the Islamic State claimed deadly attacks in Nangarhar in which members of both the government and the Taliban were killed.
Most of the victims of the suicide bombing in Jalalabad on Sunday — including 17 of those killed — were from the minority Sikh and Hindu religious groups who were coming to see Mr. Ghani, according to Najibullah Kamawal, the provincial director of public health.
Once vibrant minority groups that numbered in the hundreds of thousands across Afghanistan, Hindus and Sikhs have suffered targeted persecution on top of the widespread war that ravaged Afghanistan. Community leaders estimate that only a couple of hundred families remain, with the rest migrating to India or the West over the past four decades.
Among the victims of Sunday’s bombing was Avtar Singh Khalsa, the only Sikh candidate running in Afghanistan’s parliamentary elections in October. Health officials in Nangarhar confirmed that Mr. Khalsa died in the attack.
His candidacy drew widespread attention across Afghanistan and was celebrated as a sign of the minority group’s resilience and dedication to the country despite the harsh times.
Also among the dead was Rawail Singh, who was an active presence in civil society in Kabul. In one of the last pictures posted on his Facebook page, Mr. Singh is seen painting with his fourth-grade daughter. “My sweet daughter, learning to paint and study in the Afghan National Institute of Music,” part of the caption reads.
In the earlier attack on the school in Khogyani district, the assailants beheaded three caretakers at the Malikyar Hotak boys’ high school and then set the offices and library on fire, said Mohammed Asif Shinwari, a spokesman for the Nangarhar education department.
Malik Makee, a tribal elder in the district who also runs a pro-government militia, said he and his forces had arrived at the scene after residents asked for help. The three men who were killed were of “older age, like me,” he said.
“We sewed their heads back on their bodies before we took them to the hospital and prepared them for funerals,” he said.
Last month, the Islamic State affiliate in Afghanistan declared in a statement and in radio broadcasts that it would target schools — particularly those that teach girls — in response to the United States and Afghan military operations.
Days later, three suicide bombers tried to enter the Nangarhar education department in Jalalabad, the province’s capital. Ten civilians and one police officer were wounded in that attack, officials said.
“Afghan schools are increasingly at risk on military, ideological and political fault lines, with attacks increasing in eastern Afghanistan,” the Norwegian Refugee Council, which runs a program for displaced students at Malikyar Hotak school, said in a statement.
Mr. Makee, the militia commander, said the school that was attacked late Saturday was in an area that is largely controlled by the Taliban.
Government control in Khogyani has largely been restricted to the district center for many years, with the Taliban controlling vast parts of the area.
Last year, as Islamic State fighters were squeezed in neighboring districts, they tried to overrun the Taliban in Khogyani and establish a presence there. But they faced resistance both from the Taliban and the Afghan government.