Pre-Abrahamic religions of Azerbaijan

Very little is known about pre-Christian and pre-Islamic mythology in Eastern Transcaucasia; sources are mostly Hellenic historians like Strabo and based on archaeological evidence.

Barhail
Barhail is one of the two major Pre-Abrahamic gods. He keeps the sun on his right hand and the moon on his left hand. His right hand points East and left hand points West. If he allows his right hand to drop for too long, the world will fall under darkness forever. He decides if days should be longer or shorter.

Sabail
Sabail is the other major Pre-Abrahamic god. He is protector of sea and wind. He stands perpendicular to Barhail. His left hand prevents floods and separates the oceans from the continents. His right hand keeps the weather calm. If he drops that hand, typhoons and storms can occur.

Sun, moon and sky
Strabo names the gods of the sun, the sky, and above of all, the moon, and equates them to the Greek gods Helios, Zeus, and Selene respectively:

Sacrifice
According to Strabo, human sacrifice was widely used in pre-Christian Albania:

Ancestor worship
Unlike many pagan nations, Caucasian Albanians did not practice ancestor worship. As Strabo states:

Sacred islands
In East Albania, sacred lands existed in the islands of the Caspian Sea. Pomponius Mela wrote:

Sacred mountains
Like Greek, Chinese and Tengrist practices, local inhabitants considered several mountains to be sacred. This is the list of sacred mountains according to local legends:
 * Babadağ is the fourth highest peak in the Caucasus in Azerbaijan at 3,629 meters. It is located north of İsmayıllı. At the top is a pir dedicated to Hasrat Baba—a person revered as a holy man—who is believed to have lived during the period when the area was known as Caucasian Albania. Babadağ means "Grandfather Mountain".
 * Mount Avey is one of the peaks and a whitish-gray ridge in the Small Caucasus Mountains located between Georgia and the Gazakh district. It is 12 km away from the village of Dash Salahli. Avey means "House of the Moon".
 * Mount Goyazan is a mountain in northwestern Qazakh Rayon of Azerbaijan. Goyazan means "Skycrusher". According to ancient local beliefs, it was named because of its loneliness and being directed to the sky.
 * Khinalug is a mountain where Khinalug people live. Before Islam they were pagan, worshiping "their own fire god".

Temples
Almost every pagan temple has been replaced by churches. Notable temples were:
 * Kilsedagh church - was a temple dedicated to Mithra and paintings of Mithra can still be seen inside.
 * Anahit church - was a temple dedicated to the Armenian goddess Anahit.
 * Chaparly church - archeological excavations proved that there were pagan temples here. In a burial site, a human skeleton was discovered which contained his/her own customs, which is unusual to Christian practice.
 * Kurmuk church - a church built on an old pagan temple during Russian invasion of İlisu.
 * Lakit church - church built on an old pagan temple.
 * Mamrukh church - church built on temples dedicated to the Sun and Moon.
 * Mingachevir Church Complex - church complex built on a fire temple. It is mostly ruined, but pagan symbols still exist. One of them is a World tree between two peafowl engravings.

Non-local paganism
Huns migrated to Caucasus in 6th century AD. They established a polity here. Bishop Israel wrote about the customs of the Huns and their deities:
 * Kuara - the god of thunder.
 * Aspandiat - an old Hun hero that was deified.
 * Fire, Water, an unnamed goddess of roads.

Cruxifiction of St. Bartholomeus
According to a legend, Bartholomeus came to a place on the shore of the Caspian Sea which is likely to be Baku, cured the daughter of the local king, Polymius, of her madness, and was subsequently granted the right to preach freely in his territory by the king. The Apostolic Acts of Abdias tell that locals worshipped a goddess by the name of Astaroth. In a competition with the local priesthood, Bartholomeus assembled a large crowd in front of an image of the goddess and challenged the deity to show itself. Instead, the statue shattered and an angel appeared. The angel revealed the exorcised demon-deity to the crowd. The goddess, totally black, "sharp faced", and breathing fire and brimstone, was bound in chains by the angel and sent away. The king, amazed at what he had just seen, was immediately baptized along with many of his subjects. The king's brother, Astyages, heard of the baptisms and declared war on the Christian community. Bartholomeus was beaten with clubs, skinned alive and then finally beheaded in front of Maiden Tower.

Christian persecution of pagans
According to Movses Kaghanvatsi, Vachagan III the Pious of Albania persecuted pagan priests, tortured and forcibly converted them to Christianism. He established a Church School in a city called Rustak and raised children of pagan couples as Christian.

Islamic treatment of pagans
Not much information exists about pagans living during Islamization process of Azerbaijan, because they were converted or executed before arrival of Islam. According to Azerbaijani historian Sara Ashurbeyli several Shahs of Shirvan fought against infidels and were even killed by infidels. But it's likely to be country of Sarir. Estakhri states that pagans still existed during the 10th century. Andalusian traveler Abu Hamid al-Qarnati states that pagans were living in mountainous villages near city of Derbent in the 12th century.

Mongol invasion
The Mongol invasion can be considered a second wave of paganism in Azerbaijan, but after Ghazan's adoption of Islam as state religion, paganism and shamanism quickly dissolved.

Archeological evidences
Enormous idols found in archeological sites of Khinisly (near village of Böyük Xınıslı), Chiraghly, Daghkolany. The idols were made using local stones. Most of them are missing their head and hands. Most of the idols are roughly human height. They were made in the final centuries BC. The idol-making technique used here is not as advanced as Greco-Roman idols.

Influences
Paganism greatly influenced Azeri folklore. Supernatural beings (giants, div, fairies, dwarves) from fairy tales, religious rituals, and sacred shrines (pir) play important roles in modern Azerbaijan. Azeri metal bands like Vozmezdie and Üör usually refer to paganism in their works.