“Farah is bleeding and crying today,” Ms. Ayobi said. “The province will mourn for weeks.”

On the street where the attack took place on Wednesday, witnesses described a nightmarish scene, with bodies splayed all over. Ambulances carted charred bodies from the buildings, including the offices of the mayor, the prosecutor and the governor.

“When I reached the street I saw that all shops and houses around the courthouse were destroyed,” said Jalil Khan, 47, a civil servant at the customs office. “I saw men, women and some children lying on the ground, bleeding or burned. Some of them didn’t know where they were or what had happened to them.”

Shujauddin, 22, a teacher in the city of Farah, said he was in the courthouse to address a land dispute when the first explosion struck the government compound. When Shujauddin, who uses one name, tried to escape, he was shot in the arm twice and caught a third bullet in the leg. He woke up hours later in the hospital, he said.

Image Credit... The New York Times

The attack in Farah Province coincided with the highly anticipated return of Afghanistan’s powerful intelligence chief, Asadullah Khalid, who was seriously wounded in a December suicide attack. Mr. Khalid, who was treated in the United States and required multiple surgeries, returned to Kabul on Wednesday morning.

Mr. Khalid’s return, heralded by banners reading “Welcome” strung from traffic posts across Kabul, is seen by many as a symbolic victory for the Afghan government. At the time of the attack in December, when an insurgent detonated a hidden bomb at a National Directorate of Security guesthouse, Mr. Khalid’s very survival, no less his return, was in question.

But for months, the government promised he would again take the helm of the intelligence agency. On Wednesday, the agency issued a statement celebrating his return and promising to “continue its services day and night to bring security, peace and stability to the country.”