The earliest species to evolve in the genus homo was Homo habilis, which is believed to have evolved in Africa from Australopithecene ancestors (although which of several species of australopithecus was the direct ancestor is not known). The genus homo would go on to become the most successful species in the entire history of the earth, until it created a global ecological catasprophe in the early to mid twenty first century, which destroyed all the members of that genus, and almost every other genus above the size of bacteria.
(By the way, if you’re reading this, you’re either a homo, or an extraterrestrial intelligence that’s very tolerant of our immaturity.)
(Man, I love that pun.)
The actual origin of religion is a hotly debated topic in anthropoligical circles. We don’t know exactly when or how it happened. We know that it pre-dated the invention of writing, but not by how much. And we don’t know what the first religious beliefs were – do cave paintings represent a recording of a successful hunt, or a devotion to the aurochs spirits?
It is generally – though not universally – accepted that the ritualisation of death and burial, and the invention of the funeral, mark the earliest evidence of a belief in an afterlife or a spirit world. We know nothing of what was believed, but the care and attention which our ancestors paid to the arrangement of the dead, the things they buried with them and the markers left at gravesites – all of these imply a developing spirituality. We cannot say exactly where it happened, but somewhere in this process, the idea of God was invented.