About 30 people were inside the building when the explosion occurred, according to a temple official.
At least two people have been killed and seven others injured following an attack on a Sikh temple in the Afghan capital, Kabul, officials said.
A Taliban interior ministry spokesman told Reuters news agency that attackers had laden a car with explosives but it had detonated before reaching its target.
Taliban authorities were securing the site, he added.
A spokesman for the commander of Kabul’s security forces said soldiers have taken control of the area and cleared it of attackers. One Sikh worshipper and a Taliban fighter have been killed during the clearing operation, he added.
Members of the Sikh community said they were been prevented from entering the building by the Taliban.
"There were around 30 people inside the temple. We don’t know how many of them are alive or how many dead. The Taliban are not allowing us to go inside, we don’t know what to do,” Gornam Singh told news agencies on Saturday.
"I heard gunshots and blasts coming from the gurdwara,” Singh added.
No group has claimed responsibility for the attack.
Local broadcaster Tolo aired footage showing heavy grey fumes of smoke rising from the area.
Afghanistan’s Taliban rulers say they have secured the country since taking power in August, but international officials and analysts say the risk of a resurgence in violence remains.
Multiple attacks have taken place in recent months, with some claimed by the ISIL (ISIS) group.
Sikhs are a tiny religious minority in largely Muslim Afghanistan, comprising about 300 family members before the fall of the country to the Taliban. Many had left the country in the wake of the takeover, according to community members and media reports.
The Sikh community, like other religious minorities, has been the continual target of violence in Afghanistan. An attack claimed by ISIL at another temple in Kabul in 2020 killed 25.
Faiz Zaland, a professor of political science at Kabul University, told Al Jazeera that the Taliban is struggling to deal with internal security threats in the country.
"The Taliban are lacking counterterrorism and counterinsurgency [skills]. They also lack regional and international intel sharing support,” Zaland said.
"The groups carrying out these attacks are sending message to the government to say that [the Taliban] do not have control over the population’s security and cannot protect the minorities. This creates a trust deficit,” he added.
Saturday’s explosion follows a blast on Friday in the northern city of Kunduz at a mosque that killed one and injured two, according to authorities.
Last month, a similar attack at a mosque in the capital, Kabul, killed at least five people and wounded 22.
In April, a powerful explosion ripped through Khalifa Aga Gul Jan Mosque – also in Kabul – during Friday prayers, killing at least 10 people and wounding as many as 30.