LAHORE, Pakistan — A serial killer of eight children has been executed at a Pakistani prison after the country’s top court rejected request for his public hanging.

Imran Ali was hanged Wednesday morning in the eastern city of Lahore in the presence of the father of 7-year-old Zainab Ansari whose rape and murder shocked Pakistan in January.

A child holds up a picture of Zainab Ansari, the eight-year-old girl who was raped and murdered in Kasur, during a protest in Islamabad. Reuters

Imran was arrested two weeks after he threw Zainab’s body into a garbage dump in the city of Kasur in Punjab province.

After his arrest, Imran confessed to the other slayings and was convicted.

Zainab’s father Mohammed Amin Ansari after witnessing the execution thanked the judiciary, government and investigators for giving them speedy justice.

File photo shows a prison van carrying convicted serial child rapist and killer Imran Ali at an anti-terrorist court in Lahore, Pakistan, Wednesday, January 24, 2018. Ali was convicted for the brutal killings of eight children in the eastern city of Kasur. AP

Ali was executed by in Lahore`s Kot Lakhpat jail at 5:30am on Wednesday.

Pakistan's Geo TV channel reported that an ambulance arrived at the spot, along with Ali's brother and two of his friends.

Jail authorities arranged a 45-minute meeting for the convict and his family on Tuesday, according to Pakistani media.

Ali had confessed to raping nine girls, including Zainab Ansari, whose body was found from a garbage heap on January 9 after she went missing from her aunt's house on January 4. 

On January 23, Ali was arrested. In February, the Anti-Terrorism Court (ATC) sentenced him to 21 counts of death, three life sentences and 23 years in jail.

The rapist was executed in the presence of Magistrate Adil Sarwar and Zainab's father Muhammad Amin.