KABUL (Reuters) - Afghanistan's intelligence agency said on Wednesday it had thwarted a plot to assassinate President Hamid Karzai after arresting a bodyguard and five people with links to the Haqqani network and al Qaeda.

The National Directorate of Security (NDS) told a news conference the plotters had recruited one of Karzai's bodyguards in order to kill him.

"A dangerous and educated group including, teachers and students wanted to assassinate President Hamid Karzai," spokesman Lutfullah Mashal said.

"Unfortunately they infiltrated the presidential protection system and recruited one of the president's bodyguards."

Mashal said those detained had ties with a man named Haji Bilal, who was a member of al Qaeda and the Haqqani network based in Pakistan's tribal region of North Waziristan, bordering Afghanistan.

Karzai has been the target of at least three assassination attempts since becoming Afghan leader in 2002, most notably in April 2008, when insurgents fired guns and rockets at a military parade he attended near the presidential palace in Kabul.

The Haqqanis are one of three Taliban-allied insurgent factions fighting in Afghanistan and perhaps the most feared and are thought to have introduced suicide bombing to the country and be behind many high-profile attacks.

They have sworn allegiance to the Taliban, but have long been suspected of also having ties to Pakistan's spy agency, the Inter-Services Intelligence (ISI) directorate.

NATO-led forces fighting in Afghanistan said on Wednesday that an airstrike had killed a senior Haqqani commander and two of his associates in eastern Khost province, near the Pakistan border.

Dilawar, who was only known by one name, was a "principal subordinate" to Haji Mali Khan, who NATO captured last week and said at the time was the top Haqqani commander for Afghanistan.

Dilawar's death is "another significant loss for the insurgent group," the NATO-led International Security Assistance Force (ISAF) said in a statement that described his responsibilities as including coordinating attacks on Afghan forces and arranging weapons deliveries.

(Reporting by Hamid Shalizi; Writing by Martin Petty; Editing by Nick Macfie)