A Pakistani court Saturday handed four death sentences to a man charged with raping and murdering a six-year-old girl, in a case that shocked the country and sparked major riots in his home district.

Imran Ali, 24, was on trial for killing Zainab Fatima Ameen in the eastern city of Kasur last month.

He faces further charges in the cases of at least seven other children attacked in the Punjab city -- five of whom were murdered -- in a spate of assaults that had stoked fears a serial child killer was on the loose. He has confessed to all eight attacks, including the death of Zainab.

Ali was handed four separate death sentences after being convicted of the rape and murder of Zainab, as well as terrorism charges, prosecutor general of Punjab province Ihtesham Qadir said after a special anti-terrorism court passed its judgement.

Under Pakistani law, crimes that are considered to have spread terror in society can be charged as acts of terrorism.

The prosecutors said he also received life imprisonment and fines totalling 3.2 million rupees ($30,000) for additional charges of hiding his victim's body.

One million rupees of the fine would be given in compensation to Zainab's family, public prosecutor Abdul Rauf Wattoo told AFP.

The trial was held in Lahore's Kot Lakhpat prison under tight security. Journalists were stopped 500 metres (yards) from the prison and only relatives of the victim were allowed in court for the hearing.

Zainab's mother Nusrat Bibi demanded he be executed in public.

"I want him to be hanged publicly at the place where he took Zainab," she told reporters after the verdict.

Zainab's murder last month sparked outrage across Pakistan, with riots erupting in Kasur as thousands swarmed police stations and set fire to politicians' homes, while Pakistanis across the nation took to social media demanding action.

Television stations repeatedly broadcast chilling CCTV footage purportedly showing the young girl walking hand-in-hand with an unidentified male in what may have been her last moments.

Story continues

The killing sparked calls for the public execution of Ali after officials said his DNA had been recovered from the scene of the crime and matched samples from similar cases.

At least 12 cases of rape and murder have been recorded in the Kasur area in the past two years.

Ali confessed to eight cases, but it is not clear if the four others are linked.

"It was a fair trial," said Mian Sultan Masood, the defence lawyer provided by the state.

"The accused had confessed his crime. In this context he was correctly sentenced to death," he added.

According to the victim's father Ameen Ansari, Ali -- who lived nearby -- had taken part in the initial protests that erupted after Zainab's body was discovered.

Prior to the recent flood of cases, Kasur was already infamous for sexual abuse, after authorities uncovered a huge paedophilia ring in the city in 2015.