B ombings and shootings, Taliban threats of massacre and accusations of fraud plagued Afghanistan’s presidential election on Saturday.

But there was also the flickering hope among voters of a better future for a country torn apart by years of relentless violence.

Around 20 attacks were carried out across the country – including on polling stations – with explosions in the cities of Kabul, Kandahar and Jalalabad.

However, there were no reports of any large scale casualties. Security forces reported on Saturday that 28 insurgents had been killed in operations in the previous 24 hours.

There had been uncertainty about whether the election would take place at all while negotiations were ongoing between the US and the Taliban in Qatar. The talks were ended earlier this month by Donald Trump after an American soldier was killed in a bombing in Afghanistan.

Afghanistan war: lives of children devastated by the endless conflict Show all 20 1 /20 Afghanistan war: lives of children devastated by the endless conflict Afghanistan war: lives of children devastated by the endless conflict Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Nooria*, 15 in the home her family has lived in for the past two years in Mazar-i Sharif She was forced to flee her home with her family after their town was attacked by armed groups. Nooria describes a rocket hitting her neighbours home killing many inside. They fled on foot with just the clothes on their backs and she now lives in Mazari Shariff where Save the Children have enrolled her in school and provide vocational training Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Nooria* hopes for a future with no war; "When they attacked our village, the rocket hit our neighbour's house and they all died. Our house then caught fire and we ran away. My friends who I used to play with - I still don't know if they are alive or if they are dead.” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict “I'm hoping for a better future, to learn, to support my family and to get them out of this difficult life. And I'm hoping for a future where there is no war.” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Naveed*, 16 at his family home in Mazar-i Sharif Naveed lost his leg when he stepped on a mine aged just 8-years-old. He was herding the family's sheep in the mountains near their home when he triggered a landmine Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict After months of medical treatment his right leg was eventually amputated. He received physiotherapy and a prosthetic leg from the International Committee for the Red Cross in Mazar Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Now enrolled in school, Naveed is being given vocational training by Save the Children. “For around a year I felt and dreamt that I still had my leg. But when I woke up and saw, there was no leg. Sometimes I’d feel with my hand to check and find it wasn't there.” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict “If someone has loses their leg, it does not mean that they have lost their mind." Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict "With the help of our minds we can continue to study, learn, and work to make the future of our families brighter.” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Naveed and Mahboob*, 55 (Naveed's father) Several years ago Neveed's father, Mahboob, was brutally beaten with rifle butts by armed groups after, he says, he failed to provide food for them while they were stationed in the family's village. He suffered brain damage which affected the right side of his body, speech and his brain function Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Habiba*, 14, and Arezo*, 15 in a village outside Kabul Habiba and Arezo were injured with their mother three years ago in a suicide bombing in Kabul. Arezo is still traumatised from what she saw and has become completely withdrawn Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Arezo's younger sister Habiba cares for her, takes her to lessons and anywhere she wants to go. They are both in school through Save the Children's 'Steps towards Afghan girls' education success' (STAGES) programme, which helps the most marginalised girls get access to education, stay in school and learn. Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Habiba says: “When I woke up and I opened my eyes I saw lots of bodies and I thought I was not alive any more. It was horrible. I'll never forget that. Whenever there is a big sound she gets scared because she was traumatised by the sound she heard during the attack. I love my sister, and I help her with her lessons, I take her anywhere." Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict "She's older than me but I feel like the older one because I support her. I hope for a better future for me and my sister.” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Khalida*, 10 in a classroom in a village outside Kabul Two years ago Khalida lost her 18-year old brother when he was killed in an explosion in Kabul. She misses him every day and says the family are still carrying the grief of his loss Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict "Two years ago, my brother was going to Kabul when an explosion happened and he lost his life. We are still carrying the grief and are crying over him. At the time we were happy, everyone was happy. Now no-one is happy in the family. When I remember him, I cry and feel so bad. I hope for peace and that war will stop, and that nobody loses their brother” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict “I want to get education to become a teacher. I want to teach others who have never been to school” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Sema*,11 at her family home in Kabul Sema recalls coming home from her aunt's house and being told that her father had been killed in a suicide attack Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict Sema still thinks about him every second and likes to look at his prayer beads (Tisbeh) to remember him. They hang from the curtain in the family home. She loves school and wants to become a teacher one day. Sema says she wants peace in her country to stop other children losing their fathers. “We still have lots of his belongings, like his car, his clothes, his watch, his shoes. Whenever we see them we cry. He gave us all so much love every moment and he is on our minds. I want for the powerful people around the world to stop the war and bring peace, because I don't want other children to lose their fathers.” Andrew Quilty/Save the Children Afghanistan war: lives of children devastated by the endless conflict “I want to become a teacher to serve the country and I don't want any girls to be illiterate. I want to teach all the girls, so they have access to education.” *Names have been changed to protect identities Andrew Quilty/Save the Children

But the negotiations are expected to continue – Mr Trump is desperate to bring troops home in time for his re-election campaign, and claim credit for ending the longest war in American history.

The meetings in Doha were meant to pave the way for an eventual deal that brings the Taliban back into government. Although a draft agreement presented by Zalmay Khalilzad, the head of the US team, had faced criticism, this is seen as a possibility for the near future.

Abdullah Abdullah, the co-leader of the outgoing government, and the main challenger to president Ashraf Ghani in the election, had said that “interim power-sharing” with the Taliban could be the answer to ending the endless strife.

Casting his vote at the polling station of Amani High School in Kabul, Mr Ghani praised the security forces for “putting in place strong measures to prevent attacks and protect the nation”.

Accompanied by his wife Bibi Gul and running mate Amrullah Saleh, he insisted that a settlement to the conflict remained the priority. “Our plans are ready for implementation, we are waiting for a fresh mandate from the nation,” he said.

But the ongoing danger was underlined by the need to deploy 70,000 soldiers and police officers on the day, with US-led international forces providing air support.

Around 29,500 polling stations were set up in schools, mosques, hospitals and government buildings.

Victims of a bomb outside a polling station are treated at a hospital in Kandahar (EPA/Muhammad Sadiq)

Nearly 1,500 of them would remain closed because adequate protection could not be guaranteed – and 901 polling stations could not be contacted when voting was supposed to start to find out if they were functioning.

Repeated bomb threats from the Taliban appeared to have affected turnout in many areas.

Numbers were low in Kabul, where a series of suicide attacks has devastated the city. But women queued up in traditionally conservative Kandahar, the birthplace of the Taliban, before polling stations opened at 7am, despite recent violence.

Some voters and officiators turned up against the wishes of family members and friends who are worried about security. They said they felt it was their duty as citizens to do so.

And some had deeply personal reasons to vote.

“I know my relations would be unhappy about me being here, they have asked me not to”, said Sherenshah Paikai, an election observer for Mr Ghani’s campaign at a polling station at Zarghuna High School.

“My husband was killed in a suicide bombing, leaving my children fatherless. I know what it’s like to be affected by violence. Our country cannot go on like this, more dead, more widows. People need to vote so that we have a stable government.”

Peace and stability is not her only concern. Ms Paikai has had to bring up four children by herself since her husband Abdulbakir, a shopkeeper, was killed four years ago.

“I had a job with the UN, but then the contract finished, and now I am without work,” she said. “It is a struggle, our economy needs to improve.”

Ms Paikai said that despite the killing of her husband, she would welcome the Taliban getting involved in politics and becoming part of a future government if that bought peace.

“They must realise that just keeping on killing is not the answer. We would like them to come back into society – as long as they give up violence,” she said.

Watching out for any malpractice alongside Ms Paikai at the polling station was Khatima Karimi, a 21-year-old nursing student who was an observer for the Abdullah team.

Donald Trump says he could 'wipe out' Afghanistan: 'I could win that war in a week'

“I am interested in politics as a woman and an Afghan and so I wanted to join in,” she said. “I did this role in the parliamentary election last year and I know what to do, I want to get involved in this more.”

Ms Karimi said she wanted to continue to live and work at a hospital in Afghanistan after she qualified. “I want to help sick people – that is why I am doing my nursing course. I know I will have to treat people injured in the fighting, but we all hope there is an end to that soon,” she said.

The previous four Afghan elections, since the fall of the Taliban, were mired in allegations of fraud – and there have been accusations that the result will be “fixed” this time too.

Dr Abdullah, who holds that he was the victim of fraud in the 2014 election against Dr Ghani, and in the previous poll against former president Hamid Karzai, maintained: “We have registered quite a few complaints, but this is just the tip of the iceberg.

“My main concern will be that massively fraudulent elections will have an impact on the mentality of the people on whether the democratic process has been functioning or not. If there is massive fraud, and somebody is announced as a winner, this will not be accepted.”

Late-night Taliban suicide attack in Kabul hours after US agrees deal to withdraw 5,000 troops from Afghanistan

The Independent Election Commission, administering the polls, claims that the use of biometric verification will prevent ballot-rigging. Every polling station has been supplied with equipment to match fingerprints and photographs to identity cards.

Hawa Alam Nuristani, the chair of the election commission, stressed that only votes with biometric verification would be counted.

But there have been complaints of the machines breaking down and officials not being able to use them properly.

Checking the voters biometrically at Amani, Zahra Abdulrahimzai did not think the system would pose too many problems.

The 20-year-old medical student said: “We have had five days of training and this is not difficult, we haven’t had any issues this morning. The people seem to accept it.”

Casting his vote at Zarghuna High School, acting interior minister Massoud Andarabi pointed out that major violence had, so far, been averted.

“We had been working 24/7 to minimise the danger and this has paid off,” he said. “I am very glad that we created the conditions for voting to take place.”

But the numbers turning up remained low. Naim Jalauddin, leaving the polling station, said: “When I came for the parliamentary election last year, I had to wait 40 minutes. This time it took two minutes.