Suicide bombers dressed as Afghan soldiers attacked a courthouse in the western Afghan city of Farah Wednesday, in an unsuccessful attempt to free more than a dozen Taliban prisoners, leaving at least 10 people killed, including three of the attackers.

Six men wearing suicide vests drove up to the provincial courthouse in Afghan national army vehicles, provincial police chief Agha Noor Kemtoz was quoted as saying by the Associated Press news agency.

Two of the attackers blew themselves up inside one of the vehicles while four others jumped out of the second and ran toward the courthouse and prosecutor's office, the report stated. Guards opened fire, killing one of the attackers, while the three remaining militants fled to nearby buildings and exchanged fire with guards, Kemtoz said.

He said the attack aimed to free 15 Taliban prisoners who were being transferred to the courthouse for trial.

"Definitely the plan was to free the prisoners with this attack, but thank God, they did not succeed," he said. "All the prisoners are accounted for."

Two policemen and three civilians, including a judge and his son, were killed in the attack. Some 72 people were wounded, including 12 security forces and 60 civilians, authorities said, as reported by the AP.

Farah province, which is bordered by Iran to the west and Afghanistan's volatile Helmand province to the east, is one of the most insecure areas of relatively calm western Afghanistan.

Violence has been rising in recent months in the strategically located Farah province, where the Taliban have been active.

In May last year, suicide bombers stormed the compound of the provincial governor of Farah, killing themselves and seven people.

In April last year, a Taliban attack in the province killed eight policemen. In the following July, a police commander and 13 junior officers in Farah joined the Taliban, a defection that was seen as particularly troubling as the U.S. and its NATO allies plan to withdraw their forces, handing over the nation’s security to the Afghans.