By Ahmad Sultan

KABUL (Reuters) - At least two people were killed and 17 injured on Saturday when a suicide bomber attacked a local commander in eastern Afghanistan, officials said.

The attacker targeted the vehicle of Haji Hayat Khan, a leader in a local movement opposing Islamic State militants in Nangarhar province, as he traveled in Jalalabad city, said Attaullah Khogyani, a spokesman for the provincial governor.

Khan's body guards saw a suspicious man on a motorbike approaching, but when the man failed to heed their warnings to stop, the guards opened fire, hitting the rider, Khogyani said.

The attacker was nevertheless able to detonate explosives, which killed at least two civilians, including a small boy, and wounded 17 others, he said.

Khan and his escorts were unharmed by the blast.

No group immediately claimed responsibility for the attack, but Khan's home district in Nangarhar has recently been the scene of fighting between government forces and militants claiming allegiance to Islamic State.

The province is also home to insurgents from the Taliban and Haqqani network, who take refuge along the rugged border with Pakistan.

(Writing by Josh Smith; Editing by Shri Navaratnam)