Suicide bombers disguised as soldiers have stormed an court in western Afghanistan, killing at least 46 people in an attempt to free Taliban fighters standing trial, officials say.
At least nine fighters were also killed in Wednesday's attack, which occurred in Farah, the main town of Farah province.
It was not immediately clear whether the accused men had escaped the court complex, although a hospital doctor said one prisoner was among those being treated for injuries.
"The attack is over, but the casualties have unfortunately risen," Mohammad Akram Khpalwak, governor of Farah province, told the AFP news agency.
"In total, 34 civilians and 12 [Afghan] security forces have been killed in the attack. We have also discovered the bodies of eight attackers, more than 100 people have also been injured."
The multiple bomb-and-gun assault will raise further questions about the Afghans' ability to secure the country as NATO reduces its combat mission by the end of next year.
The assault came as Afghan President Hamid Karzai, speaking to Al Jazeera in Qatar, said he remained open to talks with the Taliban, but that he wanted to secure the progress his government has made.
Wounded being treated
Wakil Ahmad, a doctor at Farah hospital, said medics were treating scores of wounded including two judges and one court prisoner.
The governor's compound was around 200 meters away from the scene of attack, an AFP reporter said.
Last year armed men dressed in Afghan police uniforms and wearing suicide vests stormed a government compound in Farah and killed seven people.
In November a roadside bomb planted by Taliban fighters killed 17 civilians, mostly women and children, on their way to a wedding party in Farah.
Al Jazeera's Jennifer Glasse, reporting from Kabul, recalled meeting a former Taliban commander last week, when there was an attack on a police training headquarters, before Karzai travelled to Doha for talks on the possible opening of a Taliban office in the Qatari capital.
She said the Taliban commander told her there was still a war going on and that until the Taliban's demands were met, among which was the release of Taliban prisoners, attacks such as the one on the police center would continue in Afghanistan.
The Taliban insurgency has raged since a 2001 US-led invasion put an end to its five-year rule over large parts of Afghanistan.
The group has increasingly widened its attacks outside its main power bases in the east and south, where NATO forces have focused their attention, to other areas such as Farah which borders Iran.
NATO combat troops are due to pull out of Afghanistan by the end of 2014, leaving responsibility for security to Afghan security forces.
However, there are fears that the violence will increase with their departure.
PHOTO CAPTION
Map of Afghanistan locating Farah province
Al-Jazeera