Afghanistan's intelligence service said Saturday it broke up a Taliban plot to attack the country's most notorious prison with a wave of homicide bombers.

The thwarted attack on the Policharki prison on the outskirts of the capital, Kabul, was meant to free Taliban and criminal prisoners, the Afghan intelligence service said in a statement.

The attack would have mirrored a massive assault in June on a prison in Kandahar — the country's second largest city and the spiritual home of the Taliban — that freed almost 900 prisoners, including about 400 Taliban fighters.

Three police who worked at Policharki were arrested, the intelligence service said. They were allegedly paid off by militants to help carry out the attack.

The three officers smuggled explosives and mobile phone batteries and chargers into the prison so two Taliban prisoners could make homicide vests, it said, adding the officers confessed their roles in the plot.

The intelligence service did not say when the arrests took place or when the attack was to be carried out. The commander of the prison, Maj. Gen. Abdul Baqi Basody, said the three were arrested about two weeks ago.

Elsewhere, the U.S.-led coalition said it killed nine militants in two operations, including an Al Qaeda commander.

The coalition said four militants killed in Friday's operation in Ghazni province were involved in attacks against Afghan and NATO troops. An Afghan and coalition operation killed five militants in Kandahar province on Friday, it said.

The Afghan army said its troops killed five militants in Helmand province on Friday.

More than 4,700 people — mostly militants — have died in insurgency-related violence so far this year, according to an Associated Press count of figures provided by Afghan and Western officials.