Taleban insurgents have stormed a prison and police HQ near the eastern Afghan city of Khost, leaving one inmate dead, Afghan officials say.
The attack took place in the early hours of Saturday in Ali Sher district. One policeman was injured.
Provincial police chief, Mohammad Auyub, told the BBC some of the attackers spoke Arabic and Urdu.
Afghanistan says Pakistan does not do enough to stop rebels crossing the border, an accusation Pakistan denies.
The insurgents attacked with gunfire and rocket-propelled grenades.
An arms depot inside the prison was blown up before the rebels fled across the border with Pakistan, Mr Auyub said.
"We couldn't find them despite a search," he said.
Provincial deputy intelligence director, Naqeebullah Asmati, said the prison could not call the capital for help as communications were down.
Mr Auyub said an insurgent was killed overnight in another operation in Ali Sher district.
The violence comes barely a week after parliamentary elections which the Taleban had vowed to disrupt but which passed off relatively peacefully.
Afghanistan and Pakistan have traded accusations over border raids, with both saying the other side is not doing enough for security.
More than 1,000 people have died in militant-related violence in Afghanistan this year.