1

How to understand hadith of buried alive infant girls going to Hellfire?

As Salam Elekum,

I came across a Hadith:

“The woman who buries alive her new-born girl and the girl who is buried alive both will go to Hell.” [Sunan Abu Dawood (4717) and graded as “Saheeh” by Shaikh al-Albaanee.]

And then there is another Hadith which states otherwise:

“Prophets are in Paradise, martyrs are in Paradise, infants are in Paradise and baby girls who were buried alive are in Paradise.” [Musnad Ahmad (20583, 20585), Sunan Abu Dawood (2521) and graded as “Saheeh” by Shaikh al-Albaanee

How can we understand this? Is this a contradiction? Will the buried children in Jahiliyah be in hellfire?