Image copyright AFP Image caption Zainab's rape and murder sparked outrage in Pakistan

A court in Pakistan has given a 24-year-old man, Imran Ali, four death sentences for raping and murdering a six-year old girl last month.

Zainab Ansari's body was found in a rubbish dump in the city of Kasur, south of Lahore, on 9 January.

Her murder triggered outrage across the country, including riots against alleged police incompetence in which two protesters died.

The victim's father was in court to hear the verdict, amid heavy security.

Zainab's killer has also been linked by police and the chief minister of Punjab province to the murders and assaults of other girls in the area.

Ali's alleged crimes stretch back at least a year and angry residents say authorities should have been quicker to identify him as the perpetrator.

Ali will be tried over the rest of the cases later, government prosecutor Ehtisham Qadir Shah told Reuters news agency.

Dozens of witnesses testified against Ali in the trial, where forensic evidence including DNA and polygraph tests was also presented.

Image copyright Police handout Image caption Imran Ali, shown in a police handout image, confessed to killing Zainab Ansari

Image copyright CCTV images Image caption It was family members - not police - who recovered CCTV footage showing Zainab being led away

Image copyright Reuters Image caption Ali has also been linked to other crimes against young girls

His lawyer had withdrawn from the case after Ali confessed, reports say.

Ali was handed death sentences for kidnapping, rape, murder and an act of terrorism, a life sentence for sodomy and a large fine. He now has a 15-day window in which he may appeal against the verdict.

The news of his sentencing sparked strong reactions on social media, including by Hamza Ali Abbasi, a Pakistani actor, model and director.

Some echoed calls by Zainab's parents for Ali to be hanged in public at the spot in which he kidnapped her, but commentator Ali Moeen Nawazish disagreed.

Other Twitter users suggested there could be a wider network of criminals behind the spate of child killings, and have called for investigations to continue before Ali is executed.

Police have been under huge pressure to find who killed Zainab and the other children.

Zainab's family say the police did not take action during the five days from when she was reported missing and her body was found. Relatives recovered CCTV footage of her last movements.

The video, which showed a girl being led away by a man, was circulated widely on social media.

Ali, who lived near Zainab, was arrested by police on 23 January.