Muharram was born towards the third century and spread with the clerics. The establishment of the penance and thanksgiving was due to the pagan practice of that time. Muharram appears according to a well-founded hypothesis, replacing the pagan harvest fairs.
The people depended on agriculture, and their native gods belonged to the same class. When the time of sowing and harvest began, religious ceremonies got performed. It was to implore the help of their deities in September for a rich harvest.
It also became the time to confer sacred orders. The clerics invited the people to fast and pray to implore the God for blessings of the season. Towards the end of the Middle Ages, the days of Muharram were still feasts of precept.
In its origin, Muharram was a time to give thanks to God for the benefits received from the earth. People also ask for blessing on the sowings so that they produced abundant harvests. The precept of fasting in those days got established, but was not fulfilled or accepted by all.
During these periods farmers observed weather phenomena. The prediction of the climate trend was for the next three months, as if it were the sacred weather forecast.
For prediction, people saw the direction of the wind, skies, and phenological phenomena. Those affecting animals and plants depending on the weather got taken into account. Although it was a method based on superstition, it was a popular method that had great importance.
This symbolized the arrival of the New Year. This was the most solemn and important moment of the ancient. It represented the renewal of the year, the end and the beginning of a cycle in nature. The New Year marked the end of summer and the beginning of winter.
The universal mother also belongs to the cycle of the birth and death of the plant child. In her virile form, her son divine gives fruits and dies at the end of the harvest, sacrificing themselves. These ancient fertility rites always subscribe to the harvest seasons. They manifest the eternity of the sacrifice of the child and the pain of the mother. There was a couple of days fasting.
Ishtar then reigned over all the cycles or moons of the year and the fertility of the year. All that was born during the twelve months, got considered its fruit. This idea got expressed in the belief that her son, Tammuz, was the vegetation of the whole earth. The ritual mourning for Tammuz recalls the annual fast of laments for his death. Ishtar's mourning for Tammuz is the mythical origin of fasting.
There seems to be some correspondence with Ramadan and Muharram. The important religious ceremonies of the Mahometans were the mourning for Tammuz's death.