The cult of Serapis was the one of Ancient Egyptian religion that survived the longest into the Greek and Roman periods, even if it was in an altered religion that was heavily influenced by Greek religion.
The name Serapis is a combination of Osiris (Gr and Lat Osiris, Egyptian Usir) and Apis (Gr and Lat Apis, Egyptian Hapi). He is actually the deceased Apis, a fertility god from Memphis in the shape of a bull, who had become immortal as Serapis, hence the connection with the Egyptian god of the underworld Osiris. Osiris-Apis was already being worshiped as god of the underworld in Memphis since the New Kingdom (2nd half of the 2nd millennium BCE). So he was not a new deity, but his cult was. Because the Greeks were not interested in the traditional Egyptian animal gods, Serapis was represented in a human form like the Greek Gods. His traditional Egyptian name was preserved though and translated by the Greeks as Serapis. The jurisdiction of the God was extended considerably as well. Not only was he still being worshiped as a fertility and underworld god, but now also as a medicine god, patron of the sailors and even as the new chief god. Of course it's no coincidence Ptolemy chose Serapis as the God to be worshiped by the Greeks as well as the Egyptians. The most popular Egyptian God of the moment was Osiris and Osiris-Apis was being worshiped in the former Egyptian capital Memphis, so he was particularly suitable as city god of the new Hellenistic capital Alexandria. Nevertheless Serapis was only succesful among the Greek immigrants who were concentrated in the region of Alexandria, while the native people in the rest of Egypt hardly knew his cult. Although the deity is definitely Egyptian, his cult itself was purely Greek-Hellenistic. This is clearly proved by the fact the Serapis cult spread rapidly throughout the entire Greco-Roman world. In the 2nd century BCE the Hellenistic mystery cults of Egyptian origin, like the Serapis cult, had already become such a threat to the traditional Roman religion, they were forbidden in Rome in 168 BCE. In 43 BCE during the first Triumvirate they were readmitted again, but shortly after they were temporarily banned once again by the conservative emperors Augustus and Tiberius. Nevertheless the Egyptian cults became increasingly more popular and reached their peak in the 3rd century CE.
Serapis, as some kind of reincarnation of the fertility god Apis, is a fertility god himself as well. This is clearly shown by the corn measure (Gr kalathos, Lat modius) the deity is wearing on his head. Furthermore Osiris is a cereal god as well, although he's god of the underworld in the first place. It's not surprising Serapis, the immortal god who rose from the deceased Apis, is also god of the underworld. Like the Greek god of the underworld Hades he's accompanied by a three-headed dog. This dog has a strong resemblance to the Greek Cerberus (Gr Kerberos, Lat Cerberus), but usually a snake is twined around his body and he bears the head of a dog, a wolf and a lion. As a revived God the immortal Serapis is also a healing god with a reputation at least equal to that of the Greek Asclepius. His healing powers are probably symbolized by the snake. As god of the sea he replaced the Greek Poseidon as well. His followers even regarded him as the new chief god instead of Zeus. The universal Serapis was therefore the right God for the Gnostic movement in Egypt. This philosophico-religious movement in the first centuries AD was a combination of Eastern religious ideas from Syria, Persia and Judaism, and Greek philosophical elements from Plato and Neo-Platonism, from Pythagoras and Neo-Pythagoreanism and from Stoicism. The Gnostics believed knowledge was the only way to salvation. To them religion was thinking about the great questions of life and studying secret texts, although important mystical aspects were involved as well. Furthermore they considered everything as a struggle between good and evil. There were several different fractions however, namely Jewish, Christian and pagan Gnostics. Because they believed the world was created by the highest God, the pagan Gnostics needed a deity superior to all the others. In the Egyptian city of Alexandria, the most important intellectual centre in the Mediterranean and therefor an important Gnostic centre, Serapis was an obvious choice. Serapis became the object of a mystery cult with similarities to other Eastern mystery cults as Christianity and the Mithras cult, which were both strongly influenced by Gnosticism.
At his temple, the Sarapeum in Alexandria, he was represented as a robed and bearded figure, with a three-headed dog at his right hand, and a sceptre in his left hand. In this role he was a sun god, and a god of fertility and healing.
Serapis became a god revered all around the Mediterranean Sea, and he even played a role with Gnostic, where he became a symbol of the universal god. It was the destruction of Sarapeum in Alexandria in 391 CE that marked the end of his cult, as well as Ancient Egyptian religion.
Serapis was the official chief god of Hellenistic Egypt. His cult was introduced by Ptolemy I, the founder of the Ptolemaic dynasty which ruled over Egypt after Alexander the Great (from 323 to 31 BC). Ptolemy wished to unite the native Egyptians and the Greek colonists under his authority and that of a common God in order to establish a greater interior unity, which was necessary to turn Egypt - a former Persian satrapy - into a powerful Hellenistic state.
At the time of the introduction of the Serapis cult to Egypt, Ptolemy built the Serapeum of Alexandria, the most famous Serapis temple. The numerous pilgrims from all around the Hellenistic and Roman world who visited the sanctuary - Alexandria was a large international city - hoped for a miraculous healing in particular. The temple contained a gigantic statue of a throning Serapis accompanied by his three-headed dog, made of various kinds of stone, precious metals and emeralds. Part of the sanctuary was a library with ten thousands of scrolls, which was in fact an annex of the famous Library of Alexandria, the most important scientific institute of the Hellenistic world and later the Roman Empire. The link between Serapis and Gnosticism is obvious here. Eventually the Roman emperor Theodosius ordered the destruction of the sanctuary in 391 AD. After the declaration of his edict which forbid the worship of pagan Gods and made Christianity the state religion of the Roman Empire, religious riots broke out in Alexandria between pagans and Christians. The pagans took refuge in the Serapeum and fortified it against the Christians, while captured Christians were sacrificed in revenge. The emperor declared the sacrificed Christians to be martyrs and ordered the destruction of the temple, the pagans however were free to go. The so-called Serapeum of Memphis is actually the centre of the traditional Osiris-Apis cult. In the early 3rd century emperor Caracalla built a large Serapis temple of 135 x 98m with columns of almost 22m in height on the Quirinal hill in Rome.