Police in Afghanistan say a suicide bomber blew himself up in front of a polling station in Kabul.

The first major attack in Saturday’s parliamentary elections is said to have taken place in a school in the northern Kabul neighbourhood of Khair Khana.

A doctor treating the wounded said three people were killed and six wounded.

Afghanistan Elections
Observers watch the voting process in parliamentary elections in Kabul (Massoud Hossaini/AP)

Waheed Ullah, a police officer, said ambulances were heading to hospital with victims. Dr Mashook Hakimi was working with the ambulances to get the injured to hospital.

Both the upstart local Islamic State affiliate and the Taliban threatened violence during elections, warning people to stay away from the polls.

Instead, outside most polling stations there were lines of people waiting to mark their ballot.

Afghanistan Elections
Afghan men line up to outside a polling station in Kabul (Rahmat Gul/AP)

The Taliban further warned teachers and students to not allow schools to be used as polling stations.

The suicide attack targeted a school where a polling station was set up.